Skip to content

armgit / fider

Public Imported from GitHub
0

Open platform to collect and prioritize feedback

ci: skip publish job for fork PRs

Matt Robertse5523d9083d5
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index f95f9274e..24c2989c5 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -9,7 +9,13 @@ on:
jobs:
publish:
runs-on: ubuntu-latest
- if: ${{ github.event.workflow_run.conclusion == 'success' }}
+ # Skip fork PRs: checkout refuses fork code in a trusted workflow_run context (pwn-request
+ # guard), and this job holds Docker Hub secrets. Fork PR images can be published on demand via
+ # publish-pr-multiarch.yml after review.
+ if: >-
+ ${{ github.event.workflow_run.conclusion == 'success' &&
+ (github.event.workflow_run.event != 'pull_request' ||
+ github.event.workflow_run.head_repository.full_name == github.repository) }}
steps:
- name: Dump GitHub context
run: echo "$GITHUB_CONTEXT"