diff --git a/.github/workflows/demo-testing.yml b/.github/workflows/demo-testing.yml index 1d4b95bc..75d28cc2 100644 --- a/.github/workflows/demo-testing.yml +++ b/.github/workflows/demo-testing.yml @@ -11,7 +11,13 @@ jobs: echo "${{ github.event.pull_request.body }}" PULL_REQUEST_NUMBER=$(echo "${{ github.event.pull_request.body }}" | grep -oP 'Addon PR: \K\d+' || true) if [ -z "$PULL_REQUEST_NUMBER" ]; then - echo "ADDON_REF=main" >>$GITHUB_ENV + if [ -z "${{ github.event.pull_request.base.ref }}" ]; then + echo "Using addon branch main" + echo "ADDON_REF=main" >>$GITHUB_ENV + else + echo "Using addon branch ${{ github.event.pull_request.base.ref }}" + echo "ADDON_REF=${{ github.event.pull_request.base.ref }}" >>$GITHUB_ENV + fi else echo "ADDON_REF=refs/pull/$PULL_REQUEST_NUMBER/merge" >>$GITHUB_ENV fi