Skip to content

Commit b81886b

Browse files
authored
chore(ci): update issue labeling and preview gating (#315)
Use org-level reusable workflows for new issue labeling and PR preview permission checks so deploy previews are restricted to trusted contributors. Made-with: Cursor
1 parent a128910 commit b81886b

2 files changed

Lines changed: 20 additions & 2 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: Label PF Team issues
2+
on:
3+
issues:
4+
types:
5+
- opened
6+
jobs:
7+
label:
8+
uses: patternfly/.github/.github/workflows/add-pf-team-label-workflow.yml@main
9+
secrets: inherit

.github/workflows/pr-preview.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
11
name: pr-preview
2-
on: pull_request_target
2+
on:
3+
pull_request_target:
4+
issue_comment:
5+
types: [created]
36
jobs:
7+
check-permissions:
8+
uses: patternfly/.github/.github/workflows/check-team-membership.yml@main
9+
secrets: inherit
10+
411
build-upload:
12+
needs: check-permissions
13+
if: needs.check-permissions.outputs.allowed == 'true'
514
runs-on: ubuntu-latest
615
env:
716
SURGE_LOGIN: ${{ secrets.SURGE_LOGIN }}
817
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
918
GH_PR_TOKEN: ${{ secrets.GH_PR_TOKEN }}
10-
GH_PR_NUM: ${{ github.event.number }}
19+
GH_PR_NUM: ${{ needs.check-permissions.outputs.pr-number }}
1120
steps:
1221
- uses: actions/checkout@v2
1322
# Yes, we really want to checkout the PR

0 commit comments

Comments
 (0)