[GitHubActions] generator: arbitrary extra with: inputs on the checkout step#431
Open
avidenic wants to merge 1 commit into
Open
[GitHubActions] generator: arbitrary extra with: inputs on the checkout step#431avidenic wants to merge 1 commit into
with: inputs on the checkout step#431avidenic wants to merge 1 commit into
Conversation
GitHubActionsAttribute gains a string[] CheckoutWith property whose entries are emitted verbatim inside the checkout step's with: block, after the typed keys (submodules, lfs, fetch-depth, progress, filter, ref/repository) and in the order supplied. This unblocks actions/checkout inputs the typed knobs don't cover (token, ssh-key, path, clean, persist-credentials, sparse-checkout, set-safe-directory). Raw passthrough, no validation — the build author owns the YAML, which also lets multi-line block scalars like `sparse-checkout: |` work, something a KEY: value validator would reject. Defaults to an empty array and emits nothing when unset, so existing workflows are byte-for-byte unchanged. Closes Fallout-build#389.
a5c7b92 to
4c893ec
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #389.
Adds
string[] CheckoutWithtoGitHubActionsAttribute— an escape hatch foractions/checkoutinputs the typed knobs don't cover (token,ssh-key,path,clean,persist-credentials,sparse-checkout,set-safe-directory). Each entry is emitted verbatim inside the checkout step'swith:block, after the typed keys, in supply order.submodules,lfs,fetch-depth,progress,filter,ref/repository) always emit first;CheckoutWithlines follow, in order.sparse-checkout: |with continuation lines as further entries), which aKEY: valuevalidator would reject.new string[0]and emits nothing when unset — existing workflows are byte-for-byte unchanged.Scoped out (per the issue): the
actions/checkout@v6version override (clean additive follow-up) and post-checkout shell steps (a general step-injection mechanism, not this issue).Tests — three Verify snapshot cases:
checkout-with(typed key + the issue's example, proving ordering),checkout-with-only(guard openswith:with no typed key),checkout-with-sparse(multi-line block scalar — the case raw passthrough exists to support). No*ValidationTest.cs: the feature never throws, and the repo reserves those for validating features.Testis green (all test projects pass).Packcurrently fails onmainbecauseCHANGELOG.mdwas deleted (c2cdf60) whileIPack/IHasChangelogstill requires it — pre-existing base-branch breakage, unrelated to this PR.