axodotdev / axodotdev/cargo-dist

Supporting additional environment setup steps (pre-planning)

Open
#2,065 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
Rust
Stars
2.1k
Forks
149
Avg merge
1d 11h
Merged PRs (30d)
32

Description

I have a private crate that is included as a Git dep in my project. In order for `cargo` operations against the project to succeed I have to configure Github Actions to use an access token to pull the repository.

```yaml
- run: git config --global url."https://x-access-token:${{ secrets.PRIVATE_REPO_ACCESS_TOKEN }}@github.com/".insteadOf "ssh://git@github.com/"
```

This works as expected in my other CI workflows. However, `dist`s plan phase runs `cargo metadata`, which requires that repo be cloneable. Unfortunately there doesn't appear to be a hook available that lets me inject this as a prelude to the various jobs in the release workflow. `github-build-setup` gets close, but that only affects the `build-local-artifacts` job.

Is there a way to express this with a non-dirty `release.yml`?

Contributor guide

Open the contributing guide

Research direction

Start with release.yml and the github-build-setup entry point, then trace the jobs that run cargo metadata and build-local-artifacts. Done means the release workflow can apply the required private Git dependency setup before planning without requiring a dirty release.yml.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, rust
Domain
ci-cd, release
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.