From c4a334c638bbe006b7fc78d37ddfdf0d88253409 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 20 Jun 2023 13:53:58 +0100 Subject: [PATCH] Dynamic commit --- .github/workflows/budibase_ci.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index 0b6dcc988f..90cb88fd81 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -140,15 +140,19 @@ jobs: submodules: true token: ${{ secrets.PERSONAL_ACCESS_TOKEN || github.token }} - # - name: Fetch develop branch - # run: git fetch origin develop - - name: Check pro commit id: get_pro_commits run: | cd packages/pro pro_commit=$(git rev-parse HEAD) - latest_commit=$(git rev-parse origin/develop) + + echo "Running on branch ${{ github.ref }} + if [[ "${{ github.ref }}" == "refs/heads/master" ]]; then + latest_commit=$(git rev-parse origin/master) + else + latest_commit=$(git rev-parse origin/develop) + fi + echo "pro_commit=$pro_commit" echo "pro_commit=$pro_commit" >> "$GITHUB_OUTPUT" echo "latest_commit=$latest_commit"