nixos-runner/.forgejo/workflows/publish.yaml

34 lines
831 B
YAML
Raw Normal View History

2025-02-06 15:27:53 +01:00
name: build and publish containers
on:
push:
branches:
- main
schedule:
- cron: "0 0 * * 1,3,5"
jobs:
build:
runs-on: nixos-latest
strategy: &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: |
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 }}