fix: inherit permissions instead
Deploy wiki to GitHub Pages with Jekyll / build (push) Canceled after 0s
Deploy wiki to GitHub Pages with Jekyll / deploy (push) Canceled after 0s
Firmware build / Build firmware (ultra) (push) Canceled after 0s
Firmware build / Build firmware (lite) (push) Canceled after 0s
Firmware build / Build fw-builder Docker image (push) Canceled after 0s
Client build / Build client (Compress-Archive -Path software\dist\* -DestinationPath client-windows.zip , windows, windows-latest, ? . ) (push) Canceled after 0s
Client build / Build client ((cd software/dist && zip -r "$OLDPWD/client-macos.zip" .) , macos, macos-latest, true ) (push) Canceled after 0s
Client build / Build client ((cd software/dist && zip -r "$OLDPWD/client-linux.zip" .) , linux, ubuntu-latest, true ) (push) Canceled after 0s
Push handler / Create dev pre-release with artifacts (push) Canceled after 0s
Push handler / Create tagged release with artifacts (push) Canceled after 0s
Push handler / Build Firmware (push) Canceled after 0s

The PR caller doesnt allow package write, the builder requested it always. Inherit it from caller instead -> Write on push and no write on PR

Also fix a potential race conditions when fast, consecutive pushes can result in a invalid comment state.
This commit is contained in:
GameTec_live committed 2026-08-10 21:55:12 +02:00
1 parent e509bc5311
commit ba353eadbd
2 files changed
+12 -4

No files matched your search

+1 -4
View File
@@ -15,10 +15,7 @@ on:
jobs:
build_fw_builder:
name: Build fw-builder Docker image
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
runs-on: ubuntu-latest # Inherits permissions from caller
outputs:
image_ref: ${{ steps.published-image.outputs.image_ref || steps.local-image.outputs.image_ref }}
steps:
+11
View File
@@ -38,6 +38,17 @@ jobs:
return;
}
const { data: pull } = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: pullNumber,
});
if (pull.head.sha !== run.head_sha) {
core.notice(`Skipping superseded workflow run ${run.id}`);
return;
}
const marker = '<!-- chameleon-ultra-pr-build-artifacts -->';
const lines = [marker, `# Build result for commit ${run.head_sha}`, ''];