From fe1e4a408c7071211b1f368fbdbebb3dc0d02bea Mon Sep 17 00:00:00 2001 From: "Jeffrey C. Ollie" Date: Fri, 9 Oct 2026 15:41:42 -0500 Subject: [PATCH] CI: push what the jobs build to the Nix cache Both jobs ask for an OIDC token and end by pushing to niks3, so the next run substitutes the Zig 0.17 toolchain and everything else instead of fetching it again. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Gqowneb5rQcM4Zwz6LEhTK --- .forgejo/workflows/test.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.forgejo/workflows/test.yaml b/.forgejo/workflows/test.yaml index 5d467e4..fc0173e 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 @@ -45,6 +46,12 @@ jobs: - name: Build the package run: nix build --print-build-logs + - 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. @@ -52,6 +59,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 @@ -70,3 +78,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