From 6ad19d877264662e0cab6b893252fb37a500f344 Mon Sep 17 00:00:00 2001 From: Guy Owen Date: Fri, 13 Oct 2023 15:18:02 +1100 Subject: [PATCH 1/3] [DDS-1723] Updated image tags. --- .github/workflows/build-deploy.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index bf33cd4a..05664b33 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -43,7 +43,8 @@ jobs: images: | ${{ env.REGISTRY }}/${{ github.repository }}/${{ matrix.images }} tags: | - type=ref,event=branch + type=ref,event=pr + type=raw,value={{github.event.pull_request.head.ref}},enable=${{ github.event.pull_request.merged == true }} labels: | maintainer=Digital Victoria repository=${{ github.repositoryUrl }} From 5d957db5c7d835f38ef6a9d72d01cdc2611a2b78 Mon Sep 17 00:00:00 2001 From: Guy Owen Date: Fri, 13 Oct 2023 16:23:02 +1100 Subject: [PATCH 2/3] [DDS-1723] Updated workflow event trigger for PRs. --- .github/workflows/build-deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index 05664b33..b4c28c1a 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -4,7 +4,7 @@ on: schedule: - cron: '23 20 * * 0' workflow_dispatch: - push: + pull_request: branches: - 'build/**' pull_request_target: @@ -15,7 +15,7 @@ env: REGISTRY: ghcr.io jobs: buildx: - if: github.event.pull_request.merged == true || (github.event_name == 'push' && startsWith(github.ref, 'refs/heads/build/')) || contains(fromJson('["schedule", "workflow_dispatch"]'), github.event_name) + if: github.event.pull_request.merged == true || (github.event_name == 'pull_request' && startsWith(github.ref, 'refs/heads/build/')) || contains(fromJson('["schedule", "workflow_dispatch"]'), github.event_name) runs-on: ubuntu-latest strategy: matrix: From 58095dbf2e42edc2d7066034be3fe2818e038e3f Mon Sep 17 00:00:00 2001 From: Guy Owen Date: Fri, 13 Oct 2023 16:41:42 +1100 Subject: [PATCH 3/3] [DDS-1723] Added debug tag. --- .github/workflows/build-deploy.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index b4c28c1a..02d4199e 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -44,6 +44,7 @@ jobs: ${{ env.REGISTRY }}/${{ github.repository }}/${{ matrix.images }} tags: | type=ref,event=pr + type=ref,event=branch type=raw,value={{github.event.pull_request.head.ref}},enable=${{ github.event.pull_request.merged == true }} labels: | maintainer=Digital Victoria @@ -61,4 +62,5 @@ jobs: ./gh-actions-bake.hcl ${{ steps.meta.outputs.bake-file }} # Target the default group - probably unnecessary. + # Target the default group - branchobably unnecessary. targets: ${{ matrix.images }} \ No newline at end of file