2025-02-06 15:27:53 +01:00
|
|
|
name: build and publish containers
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
2025-02-13 12:53:49 +01:00
|
|
|
paths:
|
|
|
|
- "**.nix"
|
|
|
|
- flake.lock
|
2025-02-06 15:27:53 +01:00
|
|
|
schedule:
|
|
|
|
- cron: "0 0 * * 1,3,5"
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: nixos-latest
|
2025-02-11 22:15:15 +01:00
|
|
|
strategy:
|
2025-02-06 15:27:53 +01:00
|
|
|
matrix:
|
|
|
|
container: [ nixos ]
|
|
|
|
version: [ "24.11", "unstable" ]
|
|
|
|
steps:
|
|
|
|
- name: checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
ref: 'main'
|
|
|
|
- name: nix package names
|
|
|
|
id: pkgs
|
|
|
|
run: |
|
2025-02-06 16:04:55 +01:00
|
|
|
echo "pkgs-name=${{ matrix.container }}-${{ matrix.version }}" | tr -d . >>"${GITHUB_OUTPUT}"
|
2025-02-06 15:27:53 +01:00
|
|
|
- name: build
|
2025-02-06 16:03:46 +01:00
|
|
|
uses: actions/nix/build@main
|
2025-02-06 15:27:53 +01:00
|
|
|
with:
|
|
|
|
package: ${{ steps.pkgs.outputs.pkgs-name }}
|
|
|
|
out-link: ${{ steps.pkgs.outputs.pkgs-name }}
|
2025-02-06 22:58:51 +01:00
|
|
|
- name: load image into podman
|
2025-02-06 15:27:53 +01:00
|
|
|
run: |
|
2025-02-06 23:13:55 +01:00
|
|
|
podman load < ${{ steps.pkgs.outputs.pkgs-name }}
|
2025-02-11 00:56:26 +01:00
|
|
|
- name: publish image
|
2025-02-11 22:05:32 +01:00
|
|
|
uses: actions/push-to-registry@v2
|
2025-02-11 21:53:52 +01:00
|
|
|
with:
|
2025-02-11 22:42:01 +01:00
|
|
|
image: oci-images/nixos-runner/${{ matrix.container }}
|
2025-02-11 21:53:52 +01:00
|
|
|
tags: ${{ matrix.version }}
|
|
|
|
registry: git.flyinggecko.org
|
2025-02-11 22:24:46 +01:00
|
|
|
username: flyinggecko
|
2025-02-11 22:48:35 +01:00
|
|
|
password: ${{ secrets.REGISTRY_TOKEN }}
|