ci: grant contents:write + drop artifact upload-on-failure

Two follow-ups to 75a68a1 (releases switchover):

1. action-gh-release got 403 "Resource not accessible by integration"
   because default GITHUB_TOKEN has read-only on contents. Added
   workflow-level `permissions: contents: write`.

2. Failure-path artifact upload still hit quota wall. Replaced with
   inline `tail` of build/out/build.log + anaconda program.log
   directly to job log. No artifact upload = no quota.
This commit is contained in:
veilor-org 2026-05-02 22:13:44 +01:00
parent 75a68a1187
commit 73ac2cf96f

View file

@ -19,6 +19,9 @@ on:
release: release:
types: [published] types: [published]
permissions:
contents: write # needed for action-gh-release to create+update ci-latest
jobs: jobs:
build: build:
name: Build live ISO name: Build live ISO
@ -188,15 +191,15 @@ jobs:
build/out/*.iso build/out/*.iso
build/out/*.sha256 build/out/*.sha256
- name: Upload build log on failure # Build log on failure: print inline + skip artifact upload to avoid
# quota wall. Job log retains everything anyway.
- name: Print build log on failure
if: failure() if: failure()
uses: actions/upload-artifact@v4 run: |
with: echo "─── build/out/build.log ───"
name: veilor-os-buildlog tail -200 build/out/build.log 2>/dev/null || echo "(no build.log)"
path: | echo "─── anaconda program.log ───"
build/out/build.log find build/out/build/anaconda -name 'program.log' -exec tail -100 {} \; 2>/dev/null || echo "(no anaconda log)"
build/out/build/anaconda/
retention-days: 1
- name: Attach to release on tag - name: Attach to release on tag
if: github.event_name == 'release' if: github.event_name == 'release'