mc-ingress/.forgejo/workflows/build.yaml
Tamipes ab5b8f7a92
Some checks failed
/ build (push) Failing after 33s
feat: add niks3 to ci
2026-07-13 16:04:44 +02:00

29 lines
1.2 KiB
YAML

on:
push:
branches:
- main
jobs:
build:
runs-on: [ nix ]
steps:
- uses: actions/checkout@v4
- name: niks3 setup
uses: https://git.tami.moe/actions/niks3-upload@main
with:
token: ${{ secrets.NIKS3_TOKEN }}
- name: Nix build
run: |
nix build --extra-experimental-features "flakes nix-command" .#deps
niks3 push --pin "$FORGEJO_REPOSITORY-deps" $(readlink result)
nix build --extra-experimental-features "flakes nix-command" .#docker-image
niks3 push --pin "$FORGEJO_REPOSITORY-container" $(readlink result)
- 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:${{ github.sha }}" && \
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/minecraft-ingress