Skip to content

Commit

Permalink
cicd: Use correct ref for PR events.
Browse files Browse the repository at this point in the history
  • Loading branch information
Codex- committed Oct 30, 2022
1 parent d6ae4e0 commit 14d67e1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set target branch
run: echo "TARGET_BRANCH=${{ github.ref }}" >> $GITHUB_ENV
- name: Set target branch for PR event
if: ${{ github.event_name == 'pull_request' }}
run: echo "TARGET_BRANCH=${{ github.event.pull_request.head.ref }}" >> $GITHUB_ENV
- name: Dispatch and return Run ID
id: return_dispatch
uses: Codex-/return-dispatch@main
with:
token: ${{ secrets.TOKEN }}
ref: ${{ github.ref }}
ref: ${{ env.TARGET_BRANCH }}
repo: return-dispatch
owner: codex-
workflow: dispatch.yml
Expand Down

0 comments on commit 14d67e1

Please sign in to comment.