Skip to content

ci: Use the pr's branch on semver-checks pull_request_target workflow#694

Merged
ABorgna merged 1 commit intomasterfrom
ab/semver-checks-fix-ref
Dec 8, 2024
Merged

ci: Use the pr's branch on semver-checks pull_request_target workflow#694
ABorgna merged 1 commit intomasterfrom
ab/semver-checks-fix-ref

Conversation

@ABorgna
Copy link
Member

@ABorgna ABorgna commented Dec 8, 2024

The semver-checks workflow from #692 uses pull_request_target as a workflow trigger.
When using _target instead of pull_request events, actions/checkout fetches the base branch of the PR by default.

See in this workflow, both the base and "head" checkouts use the same sha.
https://github.com/petgraph/petgraph/actions/runs/12163228521/job/33921923785?pr=675#step:2:72

This fix sets an explicit parameter when fetching the head.

drive-by: Check if the PR has build errors and skip posting comments if so.

@ABorgna ABorgna force-pushed the ab/semver-checks-fix-ref branch from 9bd63e6 to f652bca Compare December 8, 2024 19:07
@ABorgna ABorgna merged commit 67b1415 into master Dec 8, 2024
@ABorgna ABorgna deleted the ab/semver-checks-fix-ref branch December 8, 2024 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant