3 Commits
Author SHA1 Message Date
Mateusz PstruchaandClaude Opus 5.5 28a381ffb3 Cache only cargo downloads; rust-cache isn't mirrored
CI / test (push) Successful in 2m19s
The runner resolves actions from git.app.ygg, where Swatinem/rust-cache
doesn't exist, so run #46 failed before checkout. Cache the registry
index, crate archives and git db instead, never target/, under a new
cargo-v2- key so the old target/-laden caches aren't restored.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 20:22:21 +01:00
Mateusz PstruchaandClaude Opus 5.5 546d629d36 Cache cargo with rust-cache so target/ stops growing
CI / test (push) Failing after 1s
The cargo- restore key carried every old artifact into the next save,
so the cache reached 1.2 GB and run #40 filled the shared runner's
disk. rust-cache keeps compiled dependencies only and prunes stale
files before saving.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 20:21:54 +01:00
Mateusz PstruchaandClaude Opus 5.5 1ff73f8b20 Start Renovate in ygg/deployments after a release
Renovate only runs at 03:00 UTC, so a release waited up to a day for
its deploy PR. Dispatch renovate.yml right after the image is pushed.
It needs DEPLOYMENTS_DISPATCH_TOKEN (the job token can't dispatch in
another repo); when that is missing or the call fails, it warns and
the release still succeeds, since the image is already pushed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 20:21:42 +01:00
2 changed files with 39 additions and 5 deletions

No files matched your search

+12 -5
View File
@@ -36,15 +36,22 @@ jobs:
with:
components: rustfmt, clippy
# Downloads only, no target/: caching target/ through the cargo-
# restore prefix saved every stale artifact back, the cache reached
# 1.2 GB and run #40 filled the shared runner's disk. Dependencies are
# recompiled each run instead. (Swatinem/rust-cache would keep them,
# but the runner resolves actions from git.app.ygg and it isn't
# mirrored there.) The key has a v2 prefix so no old cache with target/
# in it is restored.
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: cargo-${{ hashFiles('Cargo.lock') }}
restore-keys: cargo-
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: cargo-v2-${{ hashFiles('Cargo.lock') }}
restore-keys: cargo-v2-
- name: Check formatting
run: cargo fmt --check
+27
View File
@@ -30,3 +30,30 @@ jobs:
DIGEST: ${{ steps.image.outputs.digest }}
run: |
printf 'tags: %s\ndigest: %s\n' "$TAGS" "$DIGEST"
# Renovate in ygg/deployments otherwise only runs at 03:00 UTC, so
# start it now to open the deploy PR within minutes. The job token
# can't dispatch in another repo, so this needs a token with
# write:repository from an account with write access to ygg/deployments.
# The image is already pushed: anything going wrong here is a warning,
# never a failed release.
- name: Start Renovate in ygg/deployments
env:
TOKEN: ${{ secrets.DEPLOYMENTS_DISPATCH_TOKEN }}
API: ${{ gitea.api_url }}
run: |
if [ -z "$TOKEN" ]; then
echo "::warning::DEPLOYMENTS_DISPATCH_TOKEN is not set; Renovate opens the deploy PR at its next 03:00 UTC run"
exit 0
fi
body=$(mktemp)
code=$(curl -sS --max-time 30 -o "$body" -w '%{http_code}' -X POST \
-H "Authorization: token $TOKEN" -H 'Content-Type: application/json' \
-d '{"ref":"main"}' \
"$API/repos/ygg/deployments/actions/workflows/renovate.yml/dispatches") || code="curl failed"
if [ "$code" = 204 ]; then
echo "Renovate started: https://git.app.ygg/ygg/deployments/actions?workflow=renovate.yml"
else
echo "::warning::Could not start Renovate in ygg/deployments ($code): $(head -c 300 "$body")"
fi
rm -f "$body"