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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user