Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix dispatch event checkout #3407

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,20 @@ jobs:
if [ "${SHAHEAD}" != "${SHAINPUT}" ]; then echo "sha input from slash command does not equal the head sha" ; exit 1
else echo "shas are equal"
fi
echo ========
echo \"${{ github.event.client_payload.pull_request.head.repo.full_name }}\"
echo \"${{ github.event.client_payload.pull_request.head.ref }}\"

- uses: actions/checkout@v3
- name: Checkout Code (Repository Dispatch Event)
if: (github.event_name == 'repository_dispatch')
uses: actions/checkout@v3
with:
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to specify the repository name? Isn't it the default in this action?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be fine (?) Default: ${{ github.repository }} not sure what is the difference between the two. Maybe there's some kind of additional data that can be passed to the repository field that would make it able to checkout on the fork (?)

ref: ${{ github.event.client_payload.pull_request.head.ref }}

- name: Checkout Code (Pull Request Event)
if: (github.event_name == 'pull_request')
uses: actions/checkout@v3

- uses: actions/setup-go@v4
with:
Expand Down
Loading