Skip to content

workflows: fix invalid checkout input in pr-trigger - #235

Merged
justeph merged 1 commit into
mainfrom
pr-trigger-checkout-ref
Aug 18, 2026
Merged

workflows: fix invalid checkout input in pr-trigger#235
justeph merged 1 commit into
mainfrom
pr-trigger-checkout-ref

Conversation

@justeph

@justeph justeph commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

The dispatch-triggers job passed package_version to actions/checkout, which is not a valid input. GitHub Actions silently ignored it and fell back to the default checkout, emitting an "Unexpected input(s)" warning such as:

Warning: Unexpected input(s) 'package_version', valid inputs are ['repository', 'ref', 'token', 'ssh-key', 'ssh-known-hosts', 'ssh-strict', 'ssh-user', 'persist-credentials', 'path', 'clean', 'filter', 'sparse-checkout', 'sparse-checkout-cone-mode', 'fetch-depth', 'fetch-tags', 'show-progress', 'lfs', 'submodules', 'set-safe-directory', 'github-server-url', 'allow-unsafe-pr-checkout']

Use the correct ref input to explicitly check out the PR head commit, which clears the warning and makes the intent explicit.

This was working anyway, because the default ref is the merge commit (hence containing the correct files), so technically we could remove it completely. Let's keep it, so intent is clear. Also, we are now fetching pull request HEAD instead of the merge commit 1

The dispatch-triggers job passed `package_version` to actions/checkout,
which is not a valid input. GitHub Actions silently ignored it and fell
back to the default checkout, emitting an "Unexpected input(s)" warning
such as:

Warning: Unexpected input(s) 'package_version', valid inputs are ['repository', 'ref', 'token', 'ssh-key', 'ssh-known-hosts', 'ssh-strict', 'ssh-user', 'persist-credentials', 'path', 'clean', 'filter', 'sparse-checkout', 'sparse-checkout-cone-mode', 'fetch-depth', 'fetch-tags', 'show-progress', 'lfs', 'submodules', 'set-safe-directory', 'github-server-url', 'allow-unsafe-pr-checkout']

Use the correct `ref` input to explicitly check out the PR head commit,
which clears the warning and makes the intent explicit.

This was working anyway, because the default ref is the merge commit
(hence containing the correct files), so technically we could remove it
completely. Let's keep it, so intent is clear. Also, we are now fetching
pull request HEAD instead of the merge commit [1]

[1]: https://github.com/actions/checkout#checkout-pull-request-head-commit-instead-of-merge-commit

Signed-off-by: Julien Stephan <jstephan@baylibre.com>
@justeph
justeph requested a review from threexc August 18, 2026 16:37
@justeph
justeph merged commit 9744d32 into main Aug 18, 2026
3 checks passed
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.

2 participants