From ad9d3b5a6adc1be40701067a85ea8a6965c8dde4 Mon Sep 17 00:00:00 2001 From: "stojanovskis1@icloud.com" Date: Tue, 5 Mar 2024 10:35:58 +0100 Subject: [PATCH 1/4] update actions versions --- .github/workflows/master_merge.yml | 80 +++++++++++++++--------------- .github/workflows/pr_checks.yml | 56 ++++++++++----------- .github/workflows/trivy_scan.yml | 14 +++--- 3 files changed, 75 insertions(+), 75 deletions(-) diff --git a/.github/workflows/master_merge.yml b/.github/workflows/master_merge.yml index a5aa63e..4cf2286 100644 --- a/.github/workflows/master_merge.yml +++ b/.github/workflows/master_merge.yml @@ -9,26 +9,26 @@ jobs: build-ckan-2-10: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Login to DockerHub - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - name: Login to GitHub Container Registry - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.CR_PAT }} - name: Cache Docker layers - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | /tmp/.buildx-cache-alpine-2-10 @@ -43,7 +43,7 @@ jobs: echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.10/Dockerfile)" - name: Build and push CKAN 2.10 alpine - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: ./images/ckan/2.10 file: ./images/ckan/2.10/Dockerfile @@ -60,7 +60,7 @@ jobs: echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.10/Dockerfile.focal)" - name: Build and push CKAN 2.10 ubuntu - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: ./images/ckan/2.10 file: ./images/ckan/2.10/Dockerfile.focal @@ -74,26 +74,26 @@ jobs: build-ckan-2-9: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Login to DockerHub - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - name: Login to GitHub Container Registry - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.CR_PAT }} - name: Cache Docker layers - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | /tmp/.buildx-cache-alpine-2-9 @@ -108,7 +108,7 @@ jobs: echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.9/Dockerfile)" - name: Build and push CKAN 2.9 alpine - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: ./images/ckan/2.9 file: ./images/ckan/2.9/Dockerfile @@ -125,7 +125,7 @@ jobs: echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.9/Dockerfile.focal)" - name: Build and push CKAN 2.9 ubuntu - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: ./images/ckan/2.9 file: ./images/ckan/2.9/Dockerfile.focal @@ -139,26 +139,26 @@ jobs: build-ckan-2-8: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Login to DockerHub - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - name: Login to GitHub Container Registry - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.CR_PAT }} - name: Cache Docker layers - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | /tmp/.buildx-cache-alpine-2-8 @@ -173,7 +173,7 @@ jobs: echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.8/Dockerfile)" - name: Build and push CKAN 2.8 alpine - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: ./images/ckan/2.8 file: ./images/ckan/2.8/Dockerfile @@ -190,7 +190,7 @@ jobs: echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.8/Dockerfile.focal)" - name: Build and push CKAN 2.8 ubuntu - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: ./images/ckan/2.8 file: ./images/ckan/2.8/Dockerfile.focal @@ -204,26 +204,26 @@ jobs: build-ckan-2-7: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Login to DockerHub - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - name: Login to GitHub Container Registry - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.CR_PAT }} - name: Cache Docker layers - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | /tmp/.buildx-cache-alpine-2-7 @@ -238,7 +238,7 @@ jobs: echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.7/Dockerfile)" - name: Build and push CKAN 2.7 alpine - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: ./images/ckan/2.7 file: ./images/ckan/2.7/Dockerfile @@ -255,7 +255,7 @@ jobs: echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.7/Dockerfile.focal)" - name: Build CKAN 2.7 ubuntu - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: ./images/ckan/2.7 file: ./images/ckan/2.7/Dockerfile.focal @@ -269,26 +269,26 @@ jobs: build-ckan-datapusher: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Login to DockerHub - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - name: Login to GitHub Container Registry - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.CR_PAT }} - name: Cache Docker layers - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: /tmp/.buildx-cache-datapusher key: ${{ runner.os }}-buildx-datapusher-${{ github.sha }} @@ -301,7 +301,7 @@ jobs: echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/datapusher/Dockerfile)" - name: Build and push CKAN datapusher - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: ./images/datapusher file: ./images/datapusher/Dockerfile @@ -315,26 +315,26 @@ jobs: build-psql-init: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Login to DockerHub - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - name: Login to GitHub Container Registry - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.CR_PAT }} - name: Cache Docker layers - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: /tmp/.buildx-cache-psql-init key: ${{ runner.os }}-buildx-psql-init-${{ github.sha }} @@ -347,7 +347,7 @@ jobs: echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/psql-init/Dockerfile)" - name: Build and push psql-init - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: ./images/psql-init file: ./images/psql-init/Dockerfile diff --git a/.github/workflows/pr_checks.yml b/.github/workflows/pr_checks.yml index f16959f..a09beb2 100644 --- a/.github/workflows/pr_checks.yml +++ b/.github/workflows/pr_checks.yml @@ -9,13 +9,13 @@ jobs: build-ckan-2-10: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Cache Docker layers - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | /tmp/.buildx-cache-alpine-2-10 @@ -30,7 +30,7 @@ jobs: echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.10/Dockerfile)" - name: Build CKAN 2.10 alpine - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: ./images/ckan/2.10 file: ./images/ckan/2.10/Dockerfile @@ -45,7 +45,7 @@ jobs: echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.10/Dockerfile.focal)" - name: Build CKAN 2.10 ubuntu - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: ./images/ckan/2.10 file: ./images/ckan/2.10/Dockerfile.focal @@ -60,13 +60,13 @@ jobs: build-ckan-2-9: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Cache Docker layers - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | /tmp/.buildx-cache-alpine-2-9 @@ -81,7 +81,7 @@ jobs: echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.9/Dockerfile)" - name: Build CKAN 2.9 alpine - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: ./images/ckan/2.9 file: ./images/ckan/2.9/Dockerfile @@ -96,7 +96,7 @@ jobs: echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.9/Dockerfile.focal)" - name: Build CKAN 2.9 ubuntu - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: ./images/ckan/2.9 file: ./images/ckan/2.9/Dockerfile.focal @@ -110,13 +110,13 @@ jobs: build-ckan-2-8: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Cache Docker layers - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | /tmp/.buildx-cache-alpine-2-8 @@ -131,7 +131,7 @@ jobs: echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.8/Dockerfile)" - name: Build CKAN 2.8 alpine - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: ./images/ckan/2.8 file: ./images/ckan/2.8/Dockerfile @@ -146,7 +146,7 @@ jobs: echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.8/Dockerfile.focal)" - name: Build CKAN 2.8 ubuntu - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: ./images/ckan/2.8 file: ./images/ckan/2.8/Dockerfile.focal @@ -158,13 +158,13 @@ jobs: build-ckan-2-7: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Cache Docker layers - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | /tmp/.buildx-cache-alpine-2-7 @@ -179,7 +179,7 @@ jobs: echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.7/Dockerfile)" - name: Build CKAN 2.7 alpine - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: ./images/ckan/2.7 file: ./images/ckan/2.7/Dockerfile @@ -194,7 +194,7 @@ jobs: echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.7/Dockerfile.focal)" - name: Build CKAN 2.7 ubuntu - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: ./images/ckan/2.7 file: ./images/ckan/2.7/Dockerfile.focal @@ -206,13 +206,13 @@ jobs: build-ckan-datapusher: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Cache Docker layers - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: /tmp/.buildx-cache-datapusher key: ${{ runner.os }}-buildx-datapusher-${{ github.sha }} @@ -225,7 +225,7 @@ jobs: echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/datapusher/Dockerfile)" - name: Build CKAN datapusher - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: ./images/datapusher file: ./images/datapusher/Dockerfile @@ -237,13 +237,13 @@ jobs: build-psql-init: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Cache Docker layers - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: /tmp/.buildx-cache-psql-init key: ${{ runner.os }}-buildx-psql-init-${{ github.sha }} @@ -256,7 +256,7 @@ jobs: echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/psql-init/Dockerfile)" - name: Build psql-init - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: ./images/psql-init file: ./images/psql-init/Dockerfile diff --git a/.github/workflows/trivy_scan.yml b/.github/workflows/trivy_scan.yml index 6f8c917..99a4a11 100644 --- a/.github/workflows/trivy_scan.yml +++ b/.github/workflows/trivy_scan.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Run Trivy vulnerability scanner in repo mode uses: aquasecurity/trivy-action@master @@ -37,7 +37,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build an image from Dockerfile run: | @@ -62,7 +62,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build an image from Dockerfile run: | @@ -86,7 +86,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build an image from Dockerfile run: | @@ -110,7 +110,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build an image from Dockerfile run: | @@ -134,7 +134,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build an image from Dockerfile run: | @@ -159,7 +159,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build an image from Dockerfile run: | From 11e1e0b169573ad4c589c8c28da3d3494b14627c Mon Sep 17 00:00:00 2001 From: "stojanovskis1@icloud.com" Date: Tue, 5 Mar 2024 11:52:43 +0100 Subject: [PATCH 2/4] change set-output to GITHUB_OUTPUT env variable --- .github/workflows/pr_checks.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/pr_checks.yml b/.github/workflows/pr_checks.yml index a09beb2..b17109d 100644 --- a/.github/workflows/pr_checks.yml +++ b/.github/workflows/pr_checks.yml @@ -27,7 +27,7 @@ jobs: - name: Get docker tag for Alpine image id: alpine run: | - echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.10/Dockerfile)" + echo "IMAGE_TAG=$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.10/Dockerfile)" >> $GITHUB_OUTPUT - name: Build CKAN 2.10 alpine uses: docker/build-push-action@v5 @@ -42,7 +42,7 @@ jobs: - name: Get docker tag for Ubuntu image id: ubuntu run: | - echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.10/Dockerfile.focal)" + echo "IMAGE_TAG=$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.10/Dockerfile.focal)" >> $GITHUB_OUTPUT - name: Build CKAN 2.10 ubuntu uses: docker/build-push-action@v5 @@ -78,7 +78,7 @@ jobs: - name: Get docker tag for Alpine image id: alpine run: | - echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.9/Dockerfile)" + echo "IMAGE_TAG=$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.9/Dockerfile)" >> $GITHUB_OUTPUT - name: Build CKAN 2.9 alpine uses: docker/build-push-action@v5 @@ -93,7 +93,7 @@ jobs: - name: Get docker tag for Ubuntu image id: ubuntu run: | - echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.9/Dockerfile.focal)" + echo "IMAGE_TAG=$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.9/Dockerfile.focal)" >> $GITHUB_OUTPUT - name: Build CKAN 2.9 ubuntu uses: docker/build-push-action@v5 @@ -128,7 +128,7 @@ jobs: - name: Get docker tag for Alpine image id: alpine run: | - echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.8/Dockerfile)" + echo "IMAGE_TAG=$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.8/Dockerfile)" >> $GITHUB_OUTPUT - name: Build CKAN 2.8 alpine uses: docker/build-push-action@v5 @@ -143,7 +143,7 @@ jobs: - name: Get docker tag for Ubuntu image id: ubuntu run: | - echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.8/Dockerfile.focal)" + echo "IMAGE_TAG=$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.8/Dockerfile.focal)" >> $GITHUB_OUTPUT - name: Build CKAN 2.8 ubuntu uses: docker/build-push-action@v5 @@ -176,7 +176,7 @@ jobs: - name: Get docker tag for Alpine image id: alpine run: | - echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.7/Dockerfile)" + echo "IMAGE_TAG=$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.7/Dockerfile)" >> $GITHUB_OUTPUT - name: Build CKAN 2.7 alpine uses: docker/build-push-action@v5 @@ -191,7 +191,7 @@ jobs: - name: Get docker tag for Ubuntu image id: ubuntu run: | - echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.7/Dockerfile.focal)" + echo "IMAGE_TAG=$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.7/Dockerfile.focal)" >> $GITHUB_OUTPUT - name: Build CKAN 2.7 ubuntu uses: docker/build-push-action@v5 @@ -222,7 +222,7 @@ jobs: - name: Get docker tag for datapusher image id: datapusher run: | - echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/datapusher/Dockerfile)" + echo "IMAGE_TAG=$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/datapusher/Dockerfile)" >> $GITHUB_OUTPUT - name: Build CKAN datapusher uses: docker/build-push-action@v5 @@ -253,7 +253,7 @@ jobs: - name: Get docker tag for psql-init image id: psql-init run: | - echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/psql-init/Dockerfile)" + echo "IMAGE_TAG=$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/psql-init/Dockerfile)" >> $GITHUB_OUTPUT - name: Build psql-init uses: docker/build-push-action@v5 From b3fec789405a8279babf417d094169256f655c47 Mon Sep 17 00:00:00 2001 From: "stojanovskis1@icloud.com" Date: Tue, 5 Mar 2024 14:01:05 +0100 Subject: [PATCH 3/4] change set-output to GITHUB_OUTPUT env variable, update actions/cache --- .github/workflows/master_merge.yml | 32 +++++++++++++++--------------- .github/workflows/pr_checks.yml | 12 +++++------ 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/master_merge.yml b/.github/workflows/master_merge.yml index 4cf2286..b521325 100644 --- a/.github/workflows/master_merge.yml +++ b/.github/workflows/master_merge.yml @@ -28,7 +28,7 @@ jobs: password: ${{ secrets.CR_PAT }} - name: Cache Docker layers - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | /tmp/.buildx-cache-alpine-2-10 @@ -40,7 +40,7 @@ jobs: - name: Get docker tag for Alpine image id: alpine run: | - echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.10/Dockerfile)" + echo "IMAGE_TAG=$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.10/Dockerfile)" >> $GITHUB_OUTPUT - name: Build and push CKAN 2.10 alpine uses: docker/build-push-action@v5 @@ -57,7 +57,7 @@ jobs: - name: Get docker tag for Ubuntu image id: ubuntu run: | - echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.10/Dockerfile.focal)" + echo "IMAGE_TAG=$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.10/Dockerfile.focal)" >> $GITHUB_OUTPUT - name: Build and push CKAN 2.10 ubuntu uses: docker/build-push-action@v5 @@ -93,7 +93,7 @@ jobs: password: ${{ secrets.CR_PAT }} - name: Cache Docker layers - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | /tmp/.buildx-cache-alpine-2-9 @@ -105,7 +105,7 @@ jobs: - name: Get docker tag for Alpine image id: alpine run: | - echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.9/Dockerfile)" + echo "IMAGE_TAG=$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.9/Dockerfile)" >> $GITHUB_OUTPUT - name: Build and push CKAN 2.9 alpine uses: docker/build-push-action@v5 @@ -122,7 +122,7 @@ jobs: - name: Get docker tag for Ubuntu image id: ubuntu run: | - echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.9/Dockerfile.focal)" + echo "IMAGE_TAG=$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.9/Dockerfile.focal)" >> $GITHUB_OUTPUT - name: Build and push CKAN 2.9 ubuntu uses: docker/build-push-action@v5 @@ -158,7 +158,7 @@ jobs: password: ${{ secrets.CR_PAT }} - name: Cache Docker layers - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | /tmp/.buildx-cache-alpine-2-8 @@ -170,7 +170,7 @@ jobs: - name: Get docker tag for Alpine image id: alpine run: | - echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.8/Dockerfile)" + echo "IMAGE_TAG=$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.8/Dockerfile)" >> $GITHUB_OUTPUT - name: Build and push CKAN 2.8 alpine uses: docker/build-push-action@v5 @@ -187,7 +187,7 @@ jobs: - name: Get docker tag for Ubuntu image id: ubuntu run: | - echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.8/Dockerfile.focal)" + echo "IMAGE_TAG=$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.8/Dockerfile.focal)" >> $GITHUB_OUTPUT - name: Build and push CKAN 2.8 ubuntu uses: docker/build-push-action@v5 @@ -223,7 +223,7 @@ jobs: password: ${{ secrets.CR_PAT }} - name: Cache Docker layers - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | /tmp/.buildx-cache-alpine-2-7 @@ -235,7 +235,7 @@ jobs: - name: Get docker tag for Alpine image id: alpine run: | - echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.7/Dockerfile)" + echo "IMAGE_TAG=$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.7/Dockerfile)" >> $GITHUB_OUTPUT - name: Build and push CKAN 2.7 alpine uses: docker/build-push-action@v5 @@ -252,7 +252,7 @@ jobs: - name: Get docker tag for Ubuntu image id: ubuntu run: | - echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.7/Dockerfile.focal)" + echo "IMAGE_TAG=$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/ckan/2.7/Dockerfile.focal)" >> $GITHUB_OUTPUT - name: Build CKAN 2.7 ubuntu uses: docker/build-push-action@v5 @@ -288,7 +288,7 @@ jobs: password: ${{ secrets.CR_PAT }} - name: Cache Docker layers - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: /tmp/.buildx-cache-datapusher key: ${{ runner.os }}-buildx-datapusher-${{ github.sha }} @@ -298,7 +298,7 @@ jobs: - name: Get docker tag for datapusher image id: datapusher run: | - echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/datapusher/Dockerfile)" + echo "IMAGE_TAG=$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/datapusher/Dockerfile)" >> $GITHUB_OUTPUT - name: Build and push CKAN datapusher uses: docker/build-push-action@v5 @@ -334,7 +334,7 @@ jobs: password: ${{ secrets.CR_PAT }} - name: Cache Docker layers - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: /tmp/.buildx-cache-psql-init key: ${{ runner.os }}-buildx-psql-init-${{ github.sha }} @@ -344,7 +344,7 @@ jobs: - name: Get docker tag for psql-init image id: psql-init run: | - echo "::set-output name=IMAGE_TAG::$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/psql-init/Dockerfile)" + echo "IMAGE_TAG=$(awk -F '=' '/IMAGE_TAG/{print $2}' ./images/psql-init/Dockerfile)" >> $GITHUB_OUTPUT - name: Build and push psql-init uses: docker/build-push-action@v5 diff --git a/.github/workflows/pr_checks.yml b/.github/workflows/pr_checks.yml index b17109d..0bad5a2 100644 --- a/.github/workflows/pr_checks.yml +++ b/.github/workflows/pr_checks.yml @@ -15,7 +15,7 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Cache Docker layers - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | /tmp/.buildx-cache-alpine-2-10 @@ -66,7 +66,7 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Cache Docker layers - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | /tmp/.buildx-cache-alpine-2-9 @@ -116,7 +116,7 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Cache Docker layers - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | /tmp/.buildx-cache-alpine-2-8 @@ -164,7 +164,7 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Cache Docker layers - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | /tmp/.buildx-cache-alpine-2-7 @@ -212,7 +212,7 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Cache Docker layers - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: /tmp/.buildx-cache-datapusher key: ${{ runner.os }}-buildx-datapusher-${{ github.sha }} @@ -243,7 +243,7 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Cache Docker layers - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: /tmp/.buildx-cache-psql-init key: ${{ runner.os }}-buildx-psql-init-${{ github.sha }} From 640c765fb0f0232c85c1bbd56b9d17ac7a944899 Mon Sep 17 00:00:00 2001 From: "stojanovskis1@icloud.com" Date: Tue, 5 Mar 2024 14:08:17 +0100 Subject: [PATCH 4/4] update codeql-action to v3 --- .github/workflows/trivy_scan.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/trivy_scan.yml b/.github/workflows/trivy_scan.yml index 99a4a11..8bce2d1 100644 --- a/.github/workflows/trivy_scan.yml +++ b/.github/workflows/trivy_scan.yml @@ -26,7 +26,7 @@ jobs: severity: 'CRITICAL' - name: Upload Trivy scan results to GitHub Security tab - uses: github/codeql-action/upload-sarif@v2 + uses: github/codeql-action/upload-sarif@v3 with: sarif_file: 'trivy-results.sarif' @@ -51,7 +51,7 @@ jobs: output: 'trivy-results.sarif' - name: Upload Trivy scan results to GitHub Security tab - uses: github/codeql-action/upload-sarif@v2 + uses: github/codeql-action/upload-sarif@v3 with: sarif_file: 'trivy-results.sarif' @@ -76,7 +76,7 @@ jobs: output: 'trivy-results.sarif' - name: Upload Trivy scan results to GitHub Security tab - uses: github/codeql-action/upload-sarif@v2 + uses: github/codeql-action/upload-sarif@v3 with: sarif_file: 'trivy-results.sarif' @@ -100,7 +100,7 @@ jobs: output: 'trivy-results.sarif' - name: Upload Trivy scan results to GitHub Security tab - uses: github/codeql-action/upload-sarif@v2 + uses: github/codeql-action/upload-sarif@v3 with: sarif_file: 'trivy-results.sarif' @@ -124,7 +124,7 @@ jobs: output: 'trivy-results.sarif' - name: Upload Trivy scan results to GitHub Security tab - uses: github/codeql-action/upload-sarif@v2 + uses: github/codeql-action/upload-sarif@v3 with: sarif_file: 'trivy-results.sarif' @@ -148,7 +148,7 @@ jobs: output: 'trivy-results.sarif' - name: Upload Trivy scan results to GitHub Security tab - uses: github/codeql-action/upload-sarif@v2 + uses: github/codeql-action/upload-sarif@v3 with: sarif_file: 'trivy-results.sarif' @@ -173,6 +173,6 @@ jobs: output: 'trivy-results.sarif' - name: Upload Trivy scan results to GitHub Security tab - uses: github/codeql-action/upload-sarif@v2 + uses: github/codeql-action/upload-sarif@v3 with: sarif_file: 'trivy-results.sarif' \ No newline at end of file