All jobs

Update the GitHub Actions in a Rust CLI's Workflows

Yes. An agent replaces the archived actions-rs steps in your Rust CLI's workflows with dtolnay/rust-toolchain and plain cargo, drops dead steps, and opens a PR.

Run this on RushOpens the console with this prompt ready to send, in a Project that has your repository.

What the agent does

The agent reads every workflow and what it pins. In a project like ajeetdsouza/zoxide there are five: ci.yml, release.yml, cd.yml, winget.yml and no-response.yml, plus a dependabot.yml that checks the github-actions ecosystem monthly. cd.yml, which publishes to crates.io on a v*.*.* tag, already uses dtolnay/rust-toolchain@stable and rust-lang/crates-io-auth-action@v1. ci.yml installs Nix with cachix/install-nix-action@v31, caches with Swatinem/rust-cache@v2.9.2, installs just with taiki-e/install-action@v2.87.21 and runs just lint test, which in the justfile means cargo-fmt --check, clippy -Dwarnings, cargo msrv verify, cargo udeps, mandoc, markdownlint, shellcheck, shfmt, yamlfmt -lint on the workflows themselves, and cargo nextest, all inside nix-shell.

The problem is in the other two. ci.yml has two actions-rs/toolchain@v1 steps guarded by if: matrix.os == 'windows-latest', but the matrix is [ubuntu-latest] only, so they never run and will never be flagged by Dependabot, which has no newer release to offer because the actions-rs organisation is archived. release.yml, which builds twelve targets from Linux musl and Android to macOS and Windows on every push to main, pull request and dispatch, leans on it throughout: actions-rs/toolchain@v1 with toolchain: stable, profile: minimal, override: true and target: ${{ matrix.target }}; actions-rs/cargo@v1 to cargo install a pinned revision of cross from git; actions-rs/cargo@v1 with use-cross to build --release --locked; actions-rs/install@v0.1 for cargo-deb; and actions-rs/cargo@v1 again for cargo deb --no-build. Those actions run on a Node runtime GitHub has deprecated and emit warnings on every run.

The agent rewrites them to what the repository already uses elsewhere. The toolchain step becomes dtolnay/rust-toolchain@stable with targets: ${{ matrix.target }}, matching cd.yml. The three actions-rs/cargo steps become plain run: lines: cargo install --locked --git https://github.com/cross-rs/cross.git --rev <the same rev> cross on Linux, then cross build --release --locked --target ${{ matrix.target }} where use-cross was true and cargo build elsewhere, with the --color=always --verbose flags kept, and cargo deb --no-build --no-strip --output=. --target ${{ matrix.target }} unchanged. actions-rs/install@v0.1 for cargo-deb becomes taiki-e/install-action with tool: cargo-deb, the action ci.yml already trusts for just. The two dead Windows-only steps in ci.yml are deleted rather than updated. Tags stay as tags, since that is the convention dependabot.yml maintains, and every remaining action's version is checked against its latest release.

Checking happens in the sandbox before the pull request: actionlint over .github/workflows, yamlfmt -lint as the justfile does, and cargo build --release --locked for the host target to confirm the exact command line the run: step now carries. The agent cannot run the cross-compilation matrix locally, and does not claim to; release.yml triggers on pull requests, so the pull request itself runs all twelve targets, and that is the check the description points at.

Start it with one API call

POST https://api.phoenix.so/o/{org}/sessions with this body:

{
  "agent": "claude",
  "input": "Update the GitHub Actions in this Rust CLI's workflows. Read every file under .github/workflows, .github/dependabot.yml and the justfile first. Replace every actions-rs step with maintained equivalents the repository already uses where possible: dtolnay/rust-toolchain for toolchains with the same targets, taiki-e/install-action for installing cargo tools, and plain run steps for cargo and cross commands, keeping every flag, the pinned cross revision and the use-cross behaviour per runner. Delete steps whose if condition can never be true given the matrix. Check every other action against its latest release and bump the ones behind, keeping the repository's tag-pinning convention. Run actionlint and the repository's own yaml lint over the workflows, build the release binary for the host target with the exact command you wrote, and open a pull request that lists each replacement and notes that the release workflow will run the full target matrix on the pull request.",
  "resources": [
    {
      "url": "https://github.com/your-org/your-app"
    }
  ]
}
  1. Get an API key. In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
  2. Send the request. POST the body in request.json to https://api.phoenix.so/o/{org}/sessions, with your repository as the resources URL. The run starts in its own cloud sandbox.
  3. Read what came back. Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.

What comes back

What comes back is a pull request that edits release.yml and ci.yml only: the toolchain, install and cargo steps replaced, the two unreachable Windows steps gone from ci.yml, any other action bumped to its current release, and no change to cd.yml, winget.yml, dependabot.yml or anything under src/. Flags, targets, the deb matrix entries and the packaging steps read exactly as before.

The description is a table with one row per replaced step: the old uses: line, the new line or run: command, and why. Below it are the actionlint and yamlfmt -lint output and the host cargo build --release --locked summary from the sandbox. The full transcript is at GET /o/{org}/sessions/{id}/messages.

Because release.yml runs on pull requests, the reviewer's main check is the pull request's own checks tab: twelve target jobs building with the new steps, and the Node runtime warnings gone from the logs. They also confirm the cross revision is the one that was pinned before and that the deb artifacts still upload.

Run it on every runner deprecation notice

GitHub announces runtime deprecations on a schedule and annotates runs that use an old one. A monthly job on your server sends this body with the repository in resources and a request_id that is a UUID v5 of the month and the repository, so a retry returns the same run. Dependabot handles the version bumps that have a release; this run handles the actions that have none.

Set a webhook_url on the key to hear run.completed with its session_url when the turn ends, and read the pull request link from the session. A run that found nothing to change says so in its result and opens no pull request.

The use case this job follows, with its automation and trigger: Upgrade dependencies weekly.

Why run it on Rush?

Replacing an archived action is not a version bump: the inputs differ, use-cross has no equivalent in a plain step, and a mistake only shows up when the twelve-target release matrix runs. The agent reads every workflow and the justfile in a sandbox, keeps each flag and revision, lints the result with the same tools the repository uses, and proves the command lines it wrote by running the host build.

The pull request carries that evidence and the run keeps the whole transcript, and the release workflow finishes the proof on the pull request itself. Several Rust repositories with the same actions-rs debt can be fixed at once, one sandbox each.

Frequently asked questions

Why not just let Dependabot handle it?

Dependabot bumps actions to a newer release of the same action. The actions-rs organisation is archived and publishes none, so those steps sit unchanged while GitHub deprecates the runtime they use. Replacing them is an edit Dependabot does not make.

Does this change how releases are built?

No. The same cross revision builds the Linux targets, cargo build --release --locked builds the others, cargo-deb still packages the five deb: true targets, and the artifact and draft-release steps are untouched. What changes is who installs the toolchain and runs the command.

Why tags rather than commit SHAs?

Because dependabot.yml already maintains tag pins monthly and the repository has chosen that convention. If you prefer SHA pinning, say so in the prompt and the agent pins every action to a commit with the version in a comment, which Dependabot also understands.

Can the agent run the full release matrix?

Not in the sandbox; there is no macOS or Windows runner there. It runs the host build to check the commands and relies on release.yml's pull_request trigger to run all twelve targets on the pull request, and the description says exactly that.

More Rust CLI jobs

The same job on other stacks

Keep reading