From 3e768333afd7e0c8da4b884bc72cfc6503f8d9cc Mon Sep 17 00:00:00 2001 From: Daryl Todosichuk Date: Mon, 28 Oct 2024 21:16:23 -0700 Subject: [PATCH] test 11.3.12 --- .github/workflows/docker-build-dev.yml | 15 ++++++++++----- applications/scripts/datafix-ab#001.sql | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docker-build-dev.yml b/.github/workflows/docker-build-dev.yml index 4888529..f976851 100644 --- a/.github/workflows/docker-build-dev.yml +++ b/.github/workflows/docker-build-dev.yml @@ -69,13 +69,18 @@ jobs: - name: List merged branch id: get_branch run: | - MERGED_BRANCH=$(git log --merges --pretty=format:"%s" -1 | grep -oE 'Merge pull request #[0-9]+ from bcgov/[^ ]+') - if [ -z "$MERGED_BRANCH" ]; then - echo "Direct push into dev branch" - echo "MERGED_BRANCH=push" >> $GITHUB_OUTPUT - else + # Get the latest merge commit message + LATEST_MERGE_COMMIT=$(git log --merges --pretty=format:"%s" -1) + + # Check if the latest merge commit matches "Merge pull request * from bcgov/*" + if echo "$LATEST_MERGE_COMMIT" | grep -qE 'Merge pull request #[0-9]+ from bcgov/[^ ]+'; then + # Extract the branch name + MERGED_BRANCH=$(echo "$LATEST_MERGE_COMMIT" | grep -oE 'Merge pull request #[0-9]+ from bcgov/[^ ]+' | sed 's/Merge pull request #[0-9]\+ from bcgov\///') echo "Merged branch: $MERGED_BRANCH" echo "MERGED_BRANCH=$MERGED_BRANCH" >> $GITHUB_OUTPUT + else + echo "Direct push into dev branch" + echo "MERGED_BRANCH=push" >> $GITHUB_OUTPUT fi outputs: SHA_SHORT: ${{steps.get_commit.outputs.SHA_SHORT}} diff --git a/applications/scripts/datafix-ab#001.sql b/applications/scripts/datafix-ab#001.sql index 95e4d57..e6f4a9e 100644 --- a/applications/scripts/datafix-ab#001.sql +++ b/applications/scripts/datafix-ab#001.sql @@ -1 +1 @@ -test 11.3.11 +test 11.3.12