From 047fbc8d48ddffa211aa9023ba0f5b7cea187531 Mon Sep 17 00:00:00 2001 From: Marco Franssen Date: Tue, 27 Jun 2023 13:16:31 +0200 Subject: [PATCH 1/8] Print workflow information to Summary This nicely shows this information on the summary page Signed-off-by: Marco Franssen --- .github/workflows/ci.yaml | 20 ++++++++++++++++---- .github/workflows/master-build.yaml | 20 ++++++++++++++++---- 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3c15700c..6385087b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -4,9 +4,16 @@ jobs: tornjak-build: 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: Show trigger info + run: | + cat <>"${GITHUB_STEP_SUMMARY}" + # Workflow job info + + - 🎉 The job was automatically triggered by a ${{ github.event_name }} event. + - 🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub! + - 🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}. + EOF + - name: Check out repository code uses: actions/checkout@v2 - name: Install Golang @@ -23,4 +30,9 @@ jobs: args: --timeout 7m - name: Run make all run: make all - - run: echo "🍏 This job's status is ${{ job.status }}." + + - name: Print job result + run: | + cat <>"${GITHUB_STEP_SUMMARY}" + - 🍏 This job's status is ${{ job.status }}. + EOF diff --git a/.github/workflows/master-build.yaml b/.github/workflows/master-build.yaml index 1e8f9b04..362d5c19 100644 --- a/.github/workflows/master-build.yaml +++ b/.github/workflows/master-build.yaml @@ -8,9 +8,16 @@ jobs: tornjak-build: 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: Show trigger info + run: | + cat <>"${GITHUB_STEP_SUMMARY}" + # Workflow job info + + - 🎉 The job was automatically triggered by a ${{ github.event_name }} event. + - 🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub! + - 🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}. + EOF + - name: Check out repository code uses: actions/checkout@v2 - name: Install Golang @@ -47,4 +54,9 @@ jobs: run: make container-tornjak-push - name: Build and push tornjak manager image run: make container-manager-push - - run: echo "🍏 This job's status is ${{ job.status }}." + + - name: Print job result + run: | + cat <>"${GITHUB_STEP_SUMMARY}" + - 🍏 This job's status is ${{ job.status }}. + EOF From 744aab7213dcd7b41e492b49fa355ce4b9dbf3e7 Mon Sep 17 00:00:00 2001 From: Marco Franssen Date: Tue, 27 Jun 2023 13:28:04 +0200 Subject: [PATCH 2/8] Pin checkout action on patch release 3.5.3 Signed-off-by: Marco Franssen --- .github/workflows/ci.yaml | 3 ++- .github/workflows/master-build.yaml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6385087b..1ab135e5 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -15,7 +15,8 @@ jobs: EOF - name: Check out repository code - uses: actions/checkout@v2 + uses: actions/checkout@v3.5.3 + - name: Install Golang uses: actions/setup-go@v3 with: diff --git a/.github/workflows/master-build.yaml b/.github/workflows/master-build.yaml index 362d5c19..6502be8b 100644 --- a/.github/workflows/master-build.yaml +++ b/.github/workflows/master-build.yaml @@ -19,7 +19,8 @@ jobs: EOF - name: Check out repository code - uses: actions/checkout@v2 + uses: actions/checkout@v3.5.3 + - name: Install Golang uses: actions/setup-go@v3 with: From 346df3ed0badf5a0657b076d9e1453f9d3cd7a9c Mon Sep 17 00:00:00 2001 From: Marco Franssen Date: Tue, 27 Jun 2023 13:29:00 +0200 Subject: [PATCH 3/8] Pin setup-go action on patch release 4.0.1 Signed-off-by: Marco Franssen --- .github/workflows/ci.yaml | 2 +- .github/workflows/master-build.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1ab135e5..058e781c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -18,7 +18,7 @@ jobs: uses: actions/checkout@v3.5.3 - name: Install Golang - uses: actions/setup-go@v3 + uses: actions/setup-go@v4.0.1 with: go-version: '1.20' - uses: actions/setup-node@v2 diff --git a/.github/workflows/master-build.yaml b/.github/workflows/master-build.yaml index 6502be8b..3f7077a8 100644 --- a/.github/workflows/master-build.yaml +++ b/.github/workflows/master-build.yaml @@ -22,7 +22,7 @@ jobs: uses: actions/checkout@v3.5.3 - name: Install Golang - uses: actions/setup-go@v3 + uses: actions/setup-go@v4.0.1 with: go-version: '1.20' - uses: actions/setup-node@v3 From 1126c7ae899ffce47587ba816a0253a86588f857 Mon Sep 17 00:00:00 2001 From: Marco Franssen Date: Tue, 27 Jun 2023 13:29:52 +0200 Subject: [PATCH 4/8] Pin setup-node action on patch release 3.6.0 Signed-off-by: Marco Franssen --- .github/workflows/ci.yaml | 4 +++- .github/workflows/master-build.yaml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 058e781c..8902f201 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -21,9 +21,11 @@ jobs: uses: actions/setup-go@v4.0.1 with: go-version: '1.20' - - uses: actions/setup-node@v2 + + - uses: actions/setup-node@v3.6.0 with: node-version: '15' + - name: golangci-lint uses: golangci/golangci-lint-action@v3 with: diff --git a/.github/workflows/master-build.yaml b/.github/workflows/master-build.yaml index 3f7077a8..1e89bd5b 100644 --- a/.github/workflows/master-build.yaml +++ b/.github/workflows/master-build.yaml @@ -25,9 +25,11 @@ jobs: uses: actions/setup-go@v4.0.1 with: go-version: '1.20' - - uses: actions/setup-node@v3 + + - uses: actions/setup-node@v3.6.0 with: node-version: '18' + - name: golangci-lint uses: golangci/golangci-lint-action@v3 with: From 8d2b11722c4449dd992311a37bea2e72b5b92bb3 Mon Sep 17 00:00:00 2001 From: Marco Franssen Date: Tue, 27 Jun 2023 13:30:39 +0200 Subject: [PATCH 5/8] Add dependabot config for github actions Signed-off-by: Marco Franssen --- .github/dependabot.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/dependabot.yaml diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml new file mode 100644 index 00000000..c82e211a --- /dev/null +++ b/.github/dependabot.yaml @@ -0,0 +1,14 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "github-actions" + # Workflow files stored in the + # default location of `.github/workflows` + directory: "/" + schedule: + interval: "daily" + open-pull-requests-limit: 5 From 6834080de2a6e2adfcbf7d73c2d7c20f4fede93d Mon Sep 17 00:00:00 2001 From: Marco Franssen Date: Tue, 27 Jun 2023 13:34:12 +0200 Subject: [PATCH 6/8] Pin golangci-lint action on patch release 3.6.0 Signed-off-by: Marco Franssen --- .github/workflows/ci.yaml | 3 ++- .github/workflows/master-build.yaml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8902f201..6c827984 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -27,10 +27,11 @@ jobs: node-version: '15' - name: golangci-lint - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v3.6.0 with: version: v1.53 args: --timeout 7m + - name: Run make all run: make all diff --git a/.github/workflows/master-build.yaml b/.github/workflows/master-build.yaml index 1e89bd5b..95bb17e2 100644 --- a/.github/workflows/master-build.yaml +++ b/.github/workflows/master-build.yaml @@ -31,10 +31,11 @@ jobs: node-version: '18' - name: golangci-lint - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v3.6.0 with: version: v1.53 args: --timeout 7m + - name: Log in to GHCR.io uses: docker/login-action@v1 with: From 70937d2b6dbe638624e793067651ff2412af83a6 Mon Sep 17 00:00:00 2001 From: Marco Franssen Date: Tue, 27 Jun 2023 14:20:55 +0200 Subject: [PATCH 7/8] Pin docker-login action on patch release 2.2.0 Signed-off-by: Marco Franssen --- .github/workflows/master-build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/master-build.yaml b/.github/workflows/master-build.yaml index 95bb17e2..dbd46e14 100644 --- a/.github/workflows/master-build.yaml +++ b/.github/workflows/master-build.yaml @@ -37,7 +37,7 @@ jobs: args: --timeout 7m - name: Log in to GHCR.io - uses: docker/login-action@v1 + uses: docker/login-action@v2.2.0 with: registry: ghcr.io username: ${{ github.repository_owner }} From 2d9030f6c39def7bf4e10d56fe90916052f658c9 Mon Sep 17 00:00:00 2001 From: Marco Franssen Date: Tue, 27 Jun 2023 14:37:05 +0200 Subject: [PATCH 8/8] Add white lines for readability of workflow Signed-off-by: Marco Franssen --- .github/workflows/master-build.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/master-build.yaml b/.github/workflows/master-build.yaml index dbd46e14..e10b4e00 100644 --- a/.github/workflows/master-build.yaml +++ b/.github/workflows/master-build.yaml @@ -46,16 +46,20 @@ jobs: # set repo and GITHUB SHA - name: Set github commit id run: echo "GITHUB_SHA=$GITHUB_SHA" >> $GITHUB_ENV + - name: Set release repo run: echo "REPO=ghcr.io/${{ github.repository_owner }}" >> $GITHUB_ENV # build and push images tagged with GITHUB_SHA, version, and latest - name: Build and push tornjak backend image run: make container-backend-push + - name: Build and push tornjak frontend image run: make container-frontend-push + - name: Build and push tornjak image (frontend+backend) run: make container-tornjak-push + - name: Build and push tornjak manager image run: make container-manager-push