From 42bbb87fe080561e4fe8ad563f3a6db6048b4836 Mon Sep 17 00:00:00 2001 From: vivid-cpreston <97257824+vivid-cpreston@users.noreply.github.com> Date: Fri, 6 Sep 2024 10:47:51 -0700 Subject: [PATCH 1/2] Update demo-openshift.yml --- .github/workflows/demo-openshift.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/demo-openshift.yml b/.github/workflows/demo-openshift.yml index 6f6e055ea..40c7ab77b 100644 --- a/.github/workflows/demo-openshift.yml +++ b/.github/workflows/demo-openshift.yml @@ -9,8 +9,8 @@ on: - 'vdyp-buildtools/migrations' concurrency: - # Cancel in progress for PR open and close - group: ${{ github.event.number }} + # Cancel if re-attempted + group: ${{ github.event_name }} cancel-in-progress: true jobs: From 5c0e13abf4aa78d55a04d1fc05b8a298016f40f5 Mon Sep 17 00:00:00 2001 From: vivid-cpreston <97257824+vivid-cpreston@users.noreply.github.com> Date: Fri, 6 Sep 2024 11:06:03 -0700 Subject: [PATCH 2/2] Use branchname for tag --- .github/workflows/demo-openshift.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/demo-openshift.yml b/.github/workflows/demo-openshift.yml index 40c7ab77b..5204378ff 100644 --- a/.github/workflows/demo-openshift.yml +++ b/.github/workflows/demo-openshift.yml @@ -23,12 +23,19 @@ jobs: package: [vdyp-api/backend, vdyp-web-ui/frontend, vdyp-buildtools/migrations] timeout-minutes: 10 steps: + - id: trimBranchName + name: trim branch name if necessary + run: | + export branchTag="${{ github.ref_name }}" + trimTag="${branchTag##*/}" + echo "BRANCH_TAG=$trimTag" >> $GITHUB_OUTPUT + - uses: bcgov-nr/action-builder-ghcr@v2.0.2 with: build_context: ${{ matrix.build_context }} keep_versions: 10 package: ${{ matrix.package }} - tag: ${{ github.event.number }} + tag: ${{ steps.trimBranchName.outputs.BRANCH_TAG }} tag_fallback: latest triggers: ('${{ matrix.package }}/')