Add Forgejo action to build and push images to Attic

This commit is contained in:
Pim Kunis 2024-04-28 00:17:59 +02:00
parent 17bb63e3d5
commit fe25e99ec4

View file

@ -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