diff --git a/.github/workflows/budibase_ci.yml b/.github/workflows/budibase_ci.yml index c98585c239..ce01e7b723 100644 --- a/.github/workflows/budibase_ci.yml +++ b/.github/workflows/budibase_ci.yml @@ -146,13 +146,14 @@ jobs: cd packages/pro pro_commit=$(git rev-parse HEAD) - branch=${{ github.head_ref || github.ref_name }} + branch=${{ github.base_ref || github.head_ref || github.ref_name }} echo "branch=$branch" - echo "head_ref=$github.head_ref" - echo "ref_name=$github.ref_name" + echo "base_ref=${{ github.base_ref }}" + echo "head_ref=${{ github.head_ref }}" + echo "ref_name=${{ github.head_ref }}"" echo "Running on branch ${{ github.ref }} - if [[ "${{ github.ref }}" == "refs/heads/master" ]]; then + if [[ "$branch" == "master" ]]; then latest_commit=$(git rev-parse origin/master) else latest_commit=$(git rev-parse origin/develop)