forgejo-actions/.github/workflows/build.yml
Tamipes 30bf11ba5d
All checks were successful
Build and Push docker image / buildAndPush (push) Successful in 40s
chore: name niks3 upload instead of it being the action url
2026-07-12 02:34:19 +02:00

30 lines
1.1 KiB
YAML

name: Build and Push docker image
on:
workflow_dispatch:
workflow_call:
push:
branches:
- main
jobs:
buildAndPush:
runs-on: [ nix ]
steps:
- uses: actions/checkout@v4
- name: Nix build
run: nix build --extra-experimental-features "flakes nix-command" .
- name: Setup skopeo
run: curl -o /etc/containers/policy.json --create-dirs https://raw.githubusercontent.com/containers/skopeo/refs/heads/main/default-policy.json
- name: Push Image
run: |
skopeo copy --dest-password "$UPLOAD_TOKEN" --dest-username "$USERNAME" "docker-archive://$(realpath result)" "docker://$IMG_URL:$(date --iso-8601)" && \
skopeo copy --dest-password "$UPLOAD_TOKEN" --dest-username "$USERNAME" "docker-archive://$(realpath result)" "docker://$IMG_URL"
env:
USERNAME: tamipes
UPLOAD_TOKEN: ${{ secrets.UPLOAD_TOKEN }}
IMG_URL: git.tami.moe/tamipes/nix
- name: niks3 upload
uses: https://git.tami.moe/actions/niks3-upload@main
with:
token: ${{ secrets.NIKS3_TOKEN }}
pin: nix-container