Files
naxos-os/.gitea/workflows/test-modules.yaml
T
Lukas Holzner e54d46e9f5
Test NaxOS Module Configurations / test-modules (push) Successful in 1m33s
Build NaxOS Bootable ISO / build-iso (push) Successful in 16m46s
Package NaxOS Release / release (push) Failing after 7m38s
feat(screenshots): replace ai mockups with real application screenshots and update package publishing
2026-09-04 09:04:53 +02:00

55 lines
2.0 KiB
YAML

name: Test NaxOS Module Configurations
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
permissions:
contents: write
packages: write
jobs:
test-modules:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v27
with:
extra_nix_config: |
experimental-features = nix-command flakes
- name: Evaluate Flake Outputs & Check Syntax
run: |
nix flake show
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
echo "Packaging naxos-os-modules.tar.gz to Gitea Packages registry..."
TOKEN="${{ secrets.PACKAGE_TOKEN }}"
if [ -z "$TOKEN" ]; then
TOKEN="${{ secrets.GITEA_TOKEN }}"
fi
RESPONSE=$(curl -s -w "\nHTTP_STATUS:%{http_code}" -X PUT \
-H "Authorization: token ${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")
STATUS=$(echo "$RESPONSE" | grep "HTTP_STATUS:" | cut -d: -f2)
BODY=$(echo "$RESPONSE" | grep -v "HTTP_STATUS:")
echo "Package upload HTTP status: $STATUS"
if [ "$STATUS" -eq 201 ] || [ "$STATUS" -eq 200 ] || [ "$STATUS" -eq 204 ]; then
echo "Successfully published naxos-os-modules.tar.gz to Gitea Packages!"
elif [ "$STATUS" -eq 409 ]; then
echo "Package version 1.0.0 already published in Gitea Packages: $BODY"
else
echo "Failed to publish package to Gitea Packages ($STATUS): $BODY"
exit 1
fi