diff --git a/.forgejo/workflows/cache.yaml b/.forgejo/workflows/cache.yaml new file mode 100644 index 0000000..09c872a --- /dev/null +++ b/.forgejo/workflows/cache.yaml @@ -0,0 +1,23 @@ +on: [ push ] +jobs: + push: + runs-on: docker + container: + image: git.kun.is/home/forgejo-nix-action:17bb63e3d5ba294e0c11b2868e41243de1ca803f + steps: + - name: Clone repository + run: git clone https://git.kun.is/home/container-images.git checkout + - name: Setup Nix cache + run: | + /bin/attic login local https://attic.kun.is ${{ secrets.ATTIC_TOKEN }} + /bin/attic use home + - name: Build Nix derivations + run: | + nix build --extra-experimental-features nix-command --extra-experimental-features flakes --out-link blog-pim ./checkout#packages.x86_64-linux.blog-pim + nix build --extra-experimental-features nix-command --extra-experimental-features flakes --no-allow-dirty --out-link forgejo-nix-action ./checkout#packages.x86_64-linux.forgejo-nix-action + nix build --extra-experimental-features nix-command --extra-experimental-features flakes --no-allow-dirty --out-link atticd ./checkout#packages.x86_64-linux.atticd + - name: Push Nix derivations to cache + run: | + /bin/attic push home blog-pim + /bin/attic push home forgejo-nix-action + /bin/attic push home atticd