1
0
mirror of https://github.com/aziascreations/BakaShrot.git synced 2026-11-23 20:58:46 +01:00

Hardened CI, Split the image push, Kept latest for releases only

The workflow's token is read-only but in the Docker jobs, where it's
only given to docker login after the image is built and checked; it goes
through env, never into a script. Checkouts don't keep it on disk (a
crate's build script can't read it), the actions are pinned to their
commits (checkout, setup-python and upload-artifact v7, on Node 24),
cargo builds with --locked (test.ps1 too), every job has a time limit,
and the image tag is checked before use. latest only moves for versions
without a "-". The login and the push are separate steps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-15 01:35:08 +01:00
parent 7709438aab
commit 25ab88aa91
4 changed files with 88 additions and 30 deletions
+3 -3
View File
@@ -18,10 +18,10 @@ function Step([string]$What, [scriptblock]$Run) {
Push-Location $PSScriptRoot
try {
Step "cargo fmt" { cargo fmt --all -- --check }
Step "cargo clippy" { cargo clippy --workspace --all-targets --all-features -- -D warnings }
Step "cargo test" { cargo test --workspace --all-features }
Step "cargo clippy" { cargo clippy --locked --workspace --all-targets --all-features -- -D warnings }
Step "cargo test" { cargo test --locked --workspace --all-features }
$env:RUSTDOCFLAGS = "-D warnings"
Step "cargo doc" { cargo doc --workspace --no-deps --all-features }
Step "cargo doc" { cargo doc --locked --workspace --no-deps --all-features }
} finally {
Pop-Location
}