From 1f08dcee41639a0d7506c68d1385f42a5f17e9c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Charri=C3=A8re?= Date: Tue, 20 Feb 2024 14:46:42 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=BE=20Saved.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/github-actions-demo.yml | 26 ------------------- .../github-actions-with-containers.yml | 21 +++++---------- ...ub-actions-with-specialized-containers.yml | 18 +++++++++++++ 3 files changed, 25 insertions(+), 40 deletions(-) delete mode 100644 .github/workflows/github-actions-demo.yml create mode 100644 .github/workflows/github-actions-with-specialized-containers.yml diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml deleted file mode 100644 index 5ced018..0000000 --- a/.github/workflows/github-actions-demo.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: GitHub Actions Demo -run-name: ${{ github.actor }} GitHub Actions 🚀 -on: [push] -jobs: - Explore-GitHub-Actions: - runs-on: ubuntu-latest - steps: - - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" - - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." - - name: Check out repository code - uses: actions/checkout@v4 - - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." - - run: echo "🖥️ The workflow is now ready to test your code on the runner." - - name: List files in the repository - run: | - ls ${{ github.workspace }} - - run: echo "🍏 This job's status is ${{ job.status }}." - - run: go version - - run: node --version - - run: lsb_release -a - Go-Deeper-With-GitHub-Actions: - runs-on: ubuntu-latest - needs: Explore-GitHub-Actions - steps: - - run: echo "👋 hello world 🌍" diff --git a/.github/workflows/github-actions-with-containers.yml b/.github/workflows/github-actions-with-containers.yml index d7fd323..ae3720f 100644 --- a/.github/workflows/github-actions-with-containers.yml +++ b/.github/workflows/github-actions-with-containers.yml @@ -1,22 +1,15 @@ -name: GitHub Actions With Containers -run-name: ${{ github.actor }} GitHub Actions 🐳 +name: Runtimes Install With Containers +run-name: Runtimes Install 🐳 on: [push] jobs: - Explore-GitHub-Actions: + Install-Go-And-NodeJS: runs-on: ubuntu-latest container: - image: philippecharriere494/my-ubuntu-go-nodejs-env:0.0.0 + image: philippecharriere494/my-ubuntu-go-nodejs-env:0.0.1 steps: - run: go version - run: lsb_release -a - # todo use a go code - - Go-Deeper-With-GitHub-Actions: - runs-on: ubuntu-latest - container: - image: philippecharriere494/my-ubuntu-go-nodejs-env:0.0.0 - needs: Explore-GitHub-Actions - steps: - - run: echo "👋 hello world 🌍" - run: node --version - # todo use a javascript code + # todo use a go code +# If I use it for every job, it will be huge + diff --git a/.github/workflows/github-actions-with-specialized-containers.yml b/.github/workflows/github-actions-with-specialized-containers.yml new file mode 100644 index 0000000..c881c39 --- /dev/null +++ b/.github/workflows/github-actions-with-specialized-containers.yml @@ -0,0 +1,18 @@ +name: Runtimes Install With Specialized Containers +run-name: Runtimes Install 🐳🚀 +on: [push] +jobs: + Install-Go: + runs-on: ubuntu-latest + container: + image: golang:1.21.3-bookworm + steps: + - run: go version + # todo use a go code +# If I use it for every job, it will be huge + Install-NodeJS: + runs-on: ubuntu-latest + container: + image: node:21.6.2-slim + steps: + - run: node --version