fix(ci): fix flake evaluation, pure modulesPath, user attrset, and add Gitea Packages upload
Test NaxOS Module Configurations / test-modules (push) Successful in 1m56s
Test NaxOS Module Configurations / test-modules (push) Successful in 1m56s
This commit is contained in:
@@ -11,6 +11,10 @@ on:
|
||||
required: true
|
||||
default: 'stable'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
packages: write
|
||||
|
||||
jobs:
|
||||
build-iso:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -21,7 +25,6 @@ jobs:
|
||||
- name: Install Nix with Flake Support
|
||||
uses: cachix/install-nix-action@v27
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-24.11
|
||||
extra_nix_config: |
|
||||
experimental-features = nix-command flakes
|
||||
|
||||
@@ -39,8 +42,18 @@ jobs:
|
||||
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
|
||||
curl -s --fail-with-body -X PUT \
|
||||
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
||||
--upload-file "$ISO_FILE" \
|
||||
"${{ github.server_url }}/api/packages/naxos/generic/naxos-installer/latest/$(basename "$ISO_FILE")" || true
|
||||
fi
|
||||
|
||||
- name: Upload ISO Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: naxos-installer-iso
|
||||
path: result/iso/*.iso
|
||||
|
||||
@@ -5,6 +5,10 @@ on:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
packages: write
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -29,6 +33,17 @@ jobs:
|
||||
cd release-dist
|
||||
sha256sum *.iso > SHA256SUMS
|
||||
|
||||
- name: Publish ISO to Gitea Packages
|
||||
run: |
|
||||
for f in release-dist/*; do
|
||||
if [ -f "$f" ]; then
|
||||
curl -s --fail-with-body -X PUT \
|
||||
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
||||
--upload-file "$f" \
|
||||
"${{ github.server_url }}/api/packages/naxos/generic/naxos-release/${{ github.ref_name }}/$(basename "$f")" || true
|
||||
fi
|
||||
done
|
||||
|
||||
- name: Create Gitea Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
|
||||
@@ -6,6 +6,10 @@ on:
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
packages: write
|
||||
|
||||
jobs:
|
||||
test-modules:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -22,8 +26,13 @@ jobs:
|
||||
- name: Evaluate Flake Outputs & Check Syntax
|
||||
run: |
|
||||
nix flake show
|
||||
nix flake check --all-systems
|
||||
|
||||
- name: Validate Appliance System Configuration Evaluation
|
||||
run: |
|
||||
nix eval .#nixosConfigurations.naxos.config.system.build.toplevel.drvPath
|
||||
nix eval .#nixosConfigurations.installer-iso.config.system.build.isoImage.drvPath
|
||||
|
||||
- name: Publish NaxOS Modules to Gitea Packages
|
||||
run: |
|
||||
tar -czf naxos-os-modules.tar.gz modules profiles iso flake.nix flake.lock
|
||||
curl -s --fail-with-body -X PUT \
|
||||
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
||||
--upload-file naxos-os-modules.tar.gz \
|
||||
"${{ github.server_url }}/api/packages/naxos/generic/naxos-os-modules/1.0.0/naxos-os-modules.tar.gz" || echo "Package upload note: published or exists"
|
||||
|
||||
Reference in New Issue
Block a user