Skip to content

Commit 88e520d

Browse files
committed
Harden release and release-tracker workflows
release-tracker.yml: - Move the merged-PR gate from the build job to label-detector so non-merge closes skip the workflow entirely. - Add explicit contents: read permissions to the build job. release.yml: - Drop misleading permissions from the label-detector job, which only runs a curl and emits a job output. - Add packages: write to the build job alongside contents: write; the docker/login-action push to ghcr.io requires it. Signed-off-by: Tamal Saha <tamal@appscode.com>
1 parent cc7f623 commit 88e520d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/release-tracker.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ concurrency:
1111

1212
jobs:
1313
label-detector:
14+
if: github.event.pull_request.merged == true
1415
name: Runner Label
1516
runs-on: label-detector
1617
outputs:
@@ -23,10 +24,11 @@ jobs:
2324
echo "label=$(curl -fsSL https://this-is-nats.appscode.ninja/runs-on/${{ github.repository_owner }}?visibility=${{ github.repository_visibility }})" >> $GITHUB_OUTPUT
2425
2526
build:
26-
if: github.event.pull_request.merged == true
2727
name: Build
2828
needs: label-detector
2929
runs-on: "${{ needs.label-detector.outputs.runs-on }}"
30+
permissions:
31+
contents: read
3032
steps:
3133
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
3234

0 commit comments

Comments
 (0)