From 4bac8b4aaecf165f465c898dbfcb8a1768e61ba6 Mon Sep 17 00:00:00 2001 From: "Jeffrey C. Ollie" Date: Wed, 7 Oct 2026 19:40:00 -0500 Subject: [PATCH] Push what CI builds to the niks3 cache Both jobs ask for an OIDC token and end by pushing to niks3, so that later runs substitute Zig 0.17, the devshell, and the fetched dependencies instead of building or downloading them again. The push only writes from main. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01QGC4CN17Zd8qcYHdwqwdM6 --- .forgejo/workflows/test.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.forgejo/workflows/test.yaml b/.forgejo/workflows/test.yaml index ea5346a..0fd4aba 100644 --- a/.forgejo/workflows/test.yaml +++ b/.forgejo/workflows/test.yaml @@ -10,6 +10,7 @@ on: jobs: test: runs-on: nixos-do-s + enable-openid-connect: true steps: - name: Check out uses: https://code.forgejo.org/actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -36,6 +37,12 @@ jobs: - name: Run the examples against a headless weston run: nix develop -c ./tools/headless.sh + - name: Push to the cache + if: ${{ !cancelled() && forge.ref == 'refs/heads/main' }} + uses: https://git.jcollie.dev/jeff/niks3-push@3f85f501658e379783381291241c6f8315a92716 + with: + server-url: https://niks3.jcollie.dev + # Published only from main, so that a branch build cannot replace the site # with a work in progress, and only after `test` has passed, so that it # cannot document a tree that does not compile. @@ -43,6 +50,7 @@ jobs: needs: test if: ${{ forge.ref == 'refs/heads/main' }} runs-on: nixos-do-s + enable-openid-connect: true steps: - name: Check out uses: https://code.forgejo.org/actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -56,3 +64,9 @@ jobs: --server jcollie.page --token ${{ forge.token }} --upload-dir zig-out/docs + + - name: Push to the cache + if: ${{ !cancelled() && forge.ref == 'refs/heads/main' }} + uses: https://git.jcollie.dev/jeff/niks3-push@3f85f501658e379783381291241c6f8315a92716 + with: + server-url: https://niks3.jcollie.dev -- knotmirror 0.0.1