nixos-runner/.forgejo/workflows/publish.yaml
Julian Stiller 02cc15954b
Some checks failed
build and publish containers / build (nixos, unstable) (push) Failing after 5m40s
build and publish containers / build (nixos, 24.11) (push) Failing after 5m42s
Actions: make publish just 1 job
2025-02-11 22:15:15 +01:00

45 lines
1.3 KiB
YAML

name: build and publish containers
on:
push:
branches:
- main
schedule:
- cron: "0 0 * * 1,3,5"
jobs:
build:
runs-on: nixos-latest
strategy:
matrix:
container: [ nixos ]
version: [ "24.11", "unstable" ]
steps:
- name: checkout
uses: actions/checkout@v4
with:
ref: 'main'
- name: nix package names
id: pkgs
run: |
echo "pkgs-name=${{ matrix.container }}-${{ matrix.version }}" | tr -d . >>"${GITHUB_OUTPUT}"
- name: build
uses: actions/nix/build@main
with:
package: ${{ steps.pkgs.outputs.pkgs-name }}
out-link: ${{ steps.pkgs.outputs.pkgs-name }}
- name: load image into podman
run: |
podman load < ${{ steps.pkgs.outputs.pkgs-name }}
- name: login to container registry
uses: actions/podman-login@v1
with:
registry: git.flyinggecko.org
username: flyinggecko
password: ${{ secrets.REGISTRY_TOKEN }}
- name: publish image
uses: actions/push-to-registry@v2
with:
image: git.flyinggecko.org/flyinggecko/oci-images/${{ matrix.container }}
tags: ${{ matrix.version }}
registry: git.flyinggecko.org