nixfiles/.gitea/workflows/installer.yaml
Jack O'Sullivan c28acb339b
Some checks reported warnings
CI / Check, build and cache Nix flake (push) Has been cancelled
Installer ISO / Build installer ISO (push) Successful in 3m13s
Installer workflow: Create ISO instead of build artifact
2023-12-05 15:36:08 +00:00

44 lines
1.4 KiB
YAML

name: Installer ISO
on:
push:
tags: [installer]
jobs:
installer:
name: Build installer ISO
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: https://github.com/actions/setup-go@v4
with:
go-version: '>=1.20.1'
- uses: cachix/install-nix-action@v23
with:
github_access_token: ${{ secrets.GH_PULL_TOKEN }}
extra_nix_config: |
# Make sure we're using sandbox
sandbox-fallback = false
extra-substituters = https://nix-cache.nul.ie/main
extra-trusted-public-keys = main:mMChkG8LwXrFirVfudqjSHasK1jV31OVElYD3eImYl8=
- name: Set up attic
run: |
nix run .#nixpkgs.mine.x86_64-linux.attic-client -- \
login --set-default colony https://nix-cache.nul.ie "${{ secrets.NIX_CACHE_TOKEN }}"
- name: Build installer ISO
id: build
run: |
nix build .#nixosConfigurations.installer.config.my.buildAs.iso
short_rev="$(git rev-parse --short HEAD)"
ln -s result/iso/nixos-installer-devplayer0.iso nixos-installer-devplayer0-$short_rev.iso
echo "short_rev=$short_rev" >> "$GITHUB_OUTPUT"
- name: Create release for ISO
uses: https://gitea.com/actions/release-action@main
with:
title: Latest installer
files: |
nixos-installer-devplayer0-${{ steps.build.outputs.short_rev }}.iso