-
Notifications
You must be signed in to change notification settings - Fork 26
workflows - use github.head_ref when building #1442
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -18,6 +18,7 @@ jobs: | |||||
| uses: actions/checkout@v4 | ||||||
| with: | ||||||
| path: c_sdk | ||||||
| ref: ${{ github.head_ref }} | ||||||
|
||||||
| ref: ${{ github.head_ref }} | |
| ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.ref }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using
inputs.sdk_branch || github.head_refcan break PRs from forks becausegithub.head_refis only a branch name and may not exist in this repo. Prefer usinggithub.event.pull_request.head.sha(orrefs/pull/${{ github.event.pull_request.number }}/head) when running onpull_request, and fall back toinputs.sdk_branch(or the triggering ref) forworkflow_dispatch.