Skip to content

Commit

Permalink
👻 workflow must use correct addon branch
Browse files Browse the repository at this point in the history
Signed-off-by: Pranav Gaikwad <[email protected]>
  • Loading branch information
pranavgaikwad committed Mar 30, 2024
1 parent bd8295e commit 6770f59
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/demo-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6770f59

Please sign in to comment.