Skip to content

Conversation

@arusahni
Copy link

@arusahni arusahni commented Sep 3, 2025

For some use cases, such as using private git crate dependencies in a project's Cargo.toml manifest, Github Actions requires a certain amount of ceremony to alias the private repo's Git URL to to something that can be cloned using an access token. For the build-local-artifacts job, this can be accomplished by adding the authentication step in the github-build-setup YML file.

There are additional jobs that necessitate these credentials be set, mainly the plan, build-global-artifacts, and host. This appears to be due to the fact they invoke cargo metadata (which attempts to resolve dependencies).

Support these use-cases by introducing a github-build-setup-jobs collection which allows users to opt-in to including the github-build-setup steps in various jobs.

Fixes #2065

@arusahni arusahni changed the title feat: apply github-build-setup steps to additional jobs. feat: apply github-build-setup steps to additional jobs Sep 3, 2025
@mistydemeo
Copy link
Contributor

Thanks for the submission!

This makes sense, and I understand the motivation, but I'm not sure always applying this is the best solution. The original motivation for this feature was to install package dependencies for builds - for example, a user needed to fetch a custom copy of Lua. This is a bit too heavy to apply to all steps if it's only neeed for builds; it would significantly add to the time it takes to run the full action without any benefit.

How about adding a new setting where we configure what phases to add the github-build-setup code to? It would default to local-build but could be extended to list other phases too, like what you're hoping for.

@arusahni
Copy link
Author

arusahni commented Sep 4, 2025

@mistydemeo that suggestion makes sense to me. Happy to make those changes.

@mistydemeo
Copy link
Contributor

Thank you! I appreciate it. Happy to review when you’re ready.

@arusahni arusahni force-pushed the feat/github-build-setup-all-the-things branch 2 times, most recently from b597511 to 52836fa Compare September 10, 2025 12:55
@arusahni arusahni changed the title feat: apply github-build-setup steps to additional jobs feat: optionally apply github-build-setup steps to additional jobs Sep 10, 2025
For some use cases, such as using private Git crate dependencies in a
project's Cargo.toml manifest, Github Actions requires a certain amount
of ceremony to alias the private repo's Git URL to to something that can
be cloned using an access token. For the `build-local-artifacts` job,
this can be accomplished by adding the authentication step in the
`github-build-setup` YML file.

There are additional jobs that necessitate these credentials be set,
mainly the `plan`, `build-global-artifacts`, and `host`. This
appears to be due to the fact they invoke `cargo metadata` (which
attempts to pull dependencies).

Support these use-cases by introducing a `github-build-setup-jobs` collection
which allows users to opt-in to including the `github-build-setup`
steps in various jobs.

Fixes axodotdev#2065
@arusahni arusahni force-pushed the feat/github-build-setup-all-the-things branch from 52836fa to 12851f7 Compare September 10, 2025 13:12
@arusahni arusahni marked this pull request as ready for review September 10, 2025 13:13
@arusahni
Copy link
Author

Alright, I think this is ready for review @mistydemeo. I appreciate your assistance!

@mistydemeo
Copy link
Contributor

I'll review soon - sorry for the delay! I've been busy.

@mistydemeo mistydemeo mentioned this pull request Oct 29, 2025
@Gankra Gankra self-requested a review October 29, 2025 20:39
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.

Supporting additional environment setup steps (pre-planning)

2 participants