ci: update build-iso workflow with PACKAGE_TOKEN fallback
Test NaxOS Module Configurations / test-modules (push) Successful in 7m53s
Test NaxOS Module Configurations / test-modules (push) Successful in 7m53s
This commit is contained in:
@@ -46,10 +46,20 @@ jobs:
|
||||
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 }}" \
|
||||
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/latest/$(basename "$ISO_FILE")" || true
|
||||
"${{ 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
|
||||
|
||||
Reference in New Issue
Block a user