From 8a53d0b404f0756093cda5aac21f577c4a29101b Mon Sep 17 00:00:00 2001 From: Daryl Todosichuk Date: Mon, 28 Oct 2024 22:44:15 -0700 Subject: [PATCH] test 11.7 --- .github/workflows/docker-build-dev.yml | 22 +++------------------- applications/scripts/datafix-ab#001.sql | 2 +- 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/.github/workflows/docker-build-dev.yml b/.github/workflows/docker-build-dev.yml index 8d6b3f9..ec5e4ce 100644 --- a/.github/workflows/docker-build-dev.yml +++ b/.github/workflows/docker-build-dev.yml @@ -69,27 +69,11 @@ jobs: - name: List merged branch id: get_branch run: | - # Get the latest merge commit message - LATEST_MERGE_COMMIT=$(git log --merges --pretty=format:"%s") git log - git log | grep -oE 'from bcgov/[^ ]+' - - # Print the latest merge commit message for debugging - echo "Latest merge commit message: $LATEST_MERGE_COMMIT" - - # 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 'from bcgov/[^ ]+' | sed 's/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 - MERGED_BRANCH=$(git log --merges --pretty=format:"%s" -1 | grep -oE 'from bcgov/[^ ]+' | sed 's/from bcgov\///') + git log -1 | grep -oE 'from bcgov/[^ ]+' + MERGED_BRANCH=$(git log -1 | grep -oE 'from bcgov/[^ ]+' | sed 's/from bcgov\///') if [ -z "$MERGED_BRANCH" ]; then - echo "Direct push no pull request from bcgov/branch" + echo "Direct push into --env ${{env.TARGET_ENV}}" echo "MERGED_BRANCH=push" >> $GITHUB_OUTPUT else echo "Merged branch: $MERGED_BRANCH" diff --git a/applications/scripts/datafix-ab#001.sql b/applications/scripts/datafix-ab#001.sql index 4f38e2a..e7c494c 100644 --- a/applications/scripts/datafix-ab#001.sql +++ b/applications/scripts/datafix-ab#001.sql @@ -1 +1 @@ -test 11.6 +test 11.7