mirror of
https://git.pumpin.online/funkpower/typikon.git
synced 2026-10-22 18:57:13 +00:00
clone by hand; the runner has no node
Every run died at the first step: "node: executable file not found in $PATH". actions/checkout is a JavaScript action, and the runner executes it with node *inside the job container* — which here is a Rust image that has never carried one. actions/cache and actions/upload-artifact are the same. The usual answer is an image carrying node as well, which for a Rust project means installing the toolchain on every run. Cloning by hand is four lines and keeps the lean image, and the repository is public so it needs no credential. release.yml collapses to a single job for the same reason. Build and publish were split across four, which meant handing wheels between them through upload-artifact — another JS action. Everything a release needs fits in one job, so nothing has to be handed over at all.
This commit is contained in:
+12
-11
@@ -21,17 +21,18 @@ jobs:
|
||||
container:
|
||||
image: rust:1.98-bookworm
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Cache cargo
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
target
|
||||
key: cargo-${{ runner.os }}-${{ hashFiles('Cargo.lock') }}
|
||||
restore-keys: cargo-${{ runner.os }}-
|
||||
# Not actions/checkout. That is a JavaScript action: the runner executes it
|
||||
# with `node` *inside this container*, and a Rust image carries no node, so
|
||||
# the job dies at the first step with "node: executable file not found in
|
||||
# $PATH". actions/cache and actions/upload-artifact are the same. Using an
|
||||
# image that also carries node would mean installing Rust on every run;
|
||||
# cloning by hand costs four lines and keeps the lean image.
|
||||
- name: Checkout
|
||||
run: |
|
||||
git init -q .
|
||||
git remote add origin "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY"
|
||||
git fetch -q --depth 1 origin "$GITHUB_SHA"
|
||||
git checkout -q FETCH_HEAD
|
||||
|
||||
# No `cargo fmt --check`. The tables in this crate are aligned by hand —
|
||||
# MONTHS, JURISDICTIONS — and rustfmt wants one entry per line, which loses
|
||||
|
||||
Reference in New Issue
Block a user