Files
naxos-os/.gitea/workflows/build-iso.yaml
T
Lukas Holzner f9d0f85d92
Test NaxOS Module Configurations / test-modules (push) Successful in 7m53s
ci: update build-iso workflow with PACKAGE_TOKEN fallback
2026-09-04 09:57:52 +02:00

70 lines
2.0 KiB
YAML

name: Build NaxOS Bootable ISO
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
channel:
description: 'Target Release Channel'
required: true
default: 'stable'
permissions:
contents: write
packages: write
jobs:
build-iso:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Nix with Flake Support
uses: cachix/install-nix-action@v27
with:
extra_nix_config: |
experimental-features = nix-command flakes
- name: Build Bootable NaxOS Installer ISO
run: |
nix build .#iso --show-trace
- name: Locate ISO Artifact
id: iso-info
run: |
ISO_FILE=$(find result/iso -name "*.iso" | head -n 1)
echo "Found ISO: $ISO_FILE"
SHA256=$(sha256sum "$ISO_FILE" | cut -d' ' -f1)
echo "SHA256: $SHA256"
echo "iso_file=$ISO_FILE" >> $GITHUB_OUTPUT
echo "sha256=$SHA256" >> $GITHUB_OUTPUT
- name: Publish ISO to Gitea Packages
run: |
ISO_FILE="${{ steps.iso-info.outputs.iso_file }}"
if [ -f "$ISO_FILE" ]; then
TOKEN="${{ secrets.PACKAGE_TOKEN }}"
if [ -z "$TOKEN" ]; then
TOKEN="${{ secrets.GITEA_TOKEN }}"
fi
ISO_NAME=$(basename "$ISO_FILE")
echo "Publishing $ISO_NAME to Gitea Packages..."
curl -s -X PUT \
-H "Authorization: token ${TOKEN}" \
--upload-file "$ISO_FILE" \
"${{ github.server_url }}/api/packages/naxos/generic/naxos-installer-iso/1.0.0/$ISO_NAME" || true
curl -s -X PUT \
-H "Authorization: token ${TOKEN}" \
--upload-file "$ISO_FILE" \
"${{ github.server_url }}/api/packages/naxos/generic/naxos-installer/latest/$ISO_NAME" || true
fi
- name: Upload ISO Artifact
uses: actions/upload-artifact@v3
with:
name: naxos-installer-iso
path: result/iso/*.iso