container-images/.forgejo/workflows/atticd.yaml
Pim Kunis c6ee065273
All checks were successful
/ atticd (push) Successful in 58s
/ blog-pim (push) Successful in 1m3s
/ forgejo-nix-action (push) Successful in 2m3s
Tag images with git revision
Fix images names when pushing to registry
2024-04-28 23:04:53 +02:00

25 lines
1.1 KiB
YAML

on: [ push ]
jobs:
atticd:
runs-on: docker
container:
image: git.kun.is/home/forgejo-nix-action:687d16c49ea7936068bac64ec68c480a9d681962
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 Atticd
run: nix build --out-link atticd ./checkout#packages.x86_64-linux.atticd
- name: Push atticd to Nix cache
run: /bin/attic push home atticd
- name: Log into container registry
run: /bin/skopeo login --tls-verify --username pim --password ${{ secrets.RUNNER_TOKEN }} https://git.kun.is
- name: Push atticd to container registry
run: |
/bin/skopeo --insecure-policy copy docker-archive:./atticd docker://git.kun.is/home/atticd:latest
gitrev=$(git --git-dir checkout/.git --work-tree checkout rev-parse HEAD)
/bin/skopeo --insecure-policy copy docker-archive:./atticd docker://git.kun.is/home/atticd:$gitrev