From 4b73f636fc32f689089a892756294e7ab9fe00d0 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Tue, 10 Oct 2023 11:34:14 +0100 Subject: [PATCH] Updating CI to only check pro when going to base branch. --- .github/workflows/budibase_ci.yml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index 9d1131ed7f..55dedb6481 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -270,18 +270,23 @@ jobs: if [[ $branch == "master" ]]; then base_commit=$(git rev-parse origin/master) - else + else if [[ $branch == "develop" ]]; then base_commit=$(git rev-parse origin/develop) fi - echo "target_branch=$branch" - echo "target_branch=$branch" >> "$GITHUB_OUTPUT" - echo "pro_commit=$pro_commit" - echo "pro_commit=$pro_commit" >> "$GITHUB_OUTPUT" - echo "base_commit=$base_commit" - echo "base_commit=$base_commit" >> "$GITHUB_OUTPUT" + if [[ ! -z $base_commit ]]; then + echo "target_branch=$branch" + echo "target_branch=$branch" >> "$GITHUB_OUTPUT" + echo "pro_commit=$pro_commit" + echo "pro_commit=$pro_commit" >> "$GITHUB_OUTPUT" + echo "base_commit=$base_commit" + echo "base_commit=$base_commit" >> "$GITHUB_OUTPUT" + else + echo "Nothing to do - branch to branch merge." + fi - - name: Check submodule merged to develop + - name: Check submodule merged to base branch + if: ${{ base_commit != '' }} uses: actions/github-script@v4 with: github-token: ${{ secrets.GITHUB_TOKEN }}