Skip to content

Commit 3449372

Browse files
authored
chore(workflows): align issue label and preview gating (#12385)
* ci(workflows): align issue label and preview gating Replace the legacy issue workflow with the org-level PF team label caller, and gate PR preview deploys behind the reusable team-membership check. Made-with: Cursor * ci(workflows): run permission check for workflow_call Remove the caller-level condition on check-permissions so workflow_call runs are not skipped through dependency status. Made-with: Cursor * ci(workflows): pin org reusable workflows to SHA Use patternfly/.github@fdb52a6 for add-pf-team-label and check-team-membership callers. Made-with: Cursor
1 parent 04d4b22 commit 3449372

3 files changed

Lines changed: 20 additions & 43 deletions

File tree

.github/workflows/add-new-issues-to-project.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

.github/workflows/documentation.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: Documentation
22
on:
33
pull_request_target:
4+
issue_comment:
5+
types: [created]
46
workflow_call:
57
secrets:
68
SURGE_LOGIN:
@@ -10,25 +12,31 @@ on:
1012
GH_PR_TOKEN:
1113
required: true
1214
jobs:
15+
check-permissions:
16+
uses: patternfly/.github/.github/workflows/check-team-membership.yml@fdb52a63a2220ec8a3b6c2d43f312cda708ffa06
17+
secrets: inherit
18+
1319
deploy:
1420
name: Build, test & deploy
1521
runs-on: ubuntu-latest
22+
needs: check-permissions
23+
if: github.event_name == 'workflow_call' || needs.check-permissions.outputs.allowed == 'true'
1624
env:
1725
SURGE_LOGIN: ${{ secrets.SURGE_LOGIN }}
1826
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
1927
GH_PR_TOKEN: ${{ secrets.GH_PR_TOKEN }}
20-
GH_PR_NUM: ${{ github.event.number }}
28+
GH_PR_NUM: ${{ needs.check-permissions.outputs.pr-number }}
2129
steps:
2230
- name: Check out project from PR branch
23-
if: github.event_name == 'pull_request_target'
31+
if: github.event_name == 'pull_request_target' || github.event_name == 'issue_comment'
2432
uses: actions/checkout@v4
2533
with:
2634
# Checkout the merge commit so that we can access the PR's changes.
2735
# This is nessesary because `pull_request_target` checks out the base branch (e.g. `main`) by default.
2836
ref: refs/pull/${{ env.GH_PR_NUM }}/head
2937

3038
- name: Check out project
31-
if: github.event_name != 'pull_request_target'
39+
if: github.event_name == 'workflow_call'
3240
uses: actions/checkout@v4
3341

3442
- name: Set up and build project
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@fdb52a63a2220ec8a3b6c2d43f312cda708ffa06
9+
secrets: inherit

0 commit comments

Comments
 (0)