feat: add forgejo actions yaml to auto build and push a container image
All checks were successful
/ build (push) Successful in 4m59s
All checks were successful
/ build (push) Successful in 4m59s
This commit is contained in:
parent
5dc61a0f12
commit
beba05a56d
1 changed files with 21 additions and 0 deletions
21
.forgejo/workflows/build.yaml
Normal file
21
.forgejo/workflows/build.yaml
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: [ nix ]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Nix build
|
||||||
|
run: nix build --extra-experimental-features "flakes nix-command" .#docker-image
|
||||||
|
- 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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue