-
Notifications
You must be signed in to change notification settings - Fork 391
fix(workflow): fix release deploy #12598
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,12 @@ on: | |
| issue_comment: | ||
| types: [created] | ||
| workflow_call: | ||
| inputs: | ||
| is-release: | ||
| description: Whether this is invoked from the Release workflow (skip PR permission gating). | ||
| type: boolean | ||
| required: false | ||
| default: false | ||
| secrets: | ||
| SURGE_LOGIN: | ||
| required: true | ||
|
|
@@ -23,7 +29,7 @@ jobs: | |
| if: >- | ||
| always() && | ||
| !cancelled() && | ||
| (github.event_name == 'workflow_call' || needs.check-permissions.outputs.allowed == 'true') | ||
| (inputs.is-release || needs.check-permissions.outputs.allowed == 'true') | ||
| env: | ||
| SURGE_LOGIN: ${{ secrets.SURGE_LOGIN }} | ||
| SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }} | ||
|
|
@@ -39,7 +45,7 @@ jobs: | |
| ref: refs/pull/${{ env.GH_PR_NUM }}/head | ||
|
|
||
| - name: Check out project | ||
| if: github.event_name == 'workflow_call' | ||
| if: inputs.is-release | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== workflow files =="
git ls-files .github/workflows | sed -n '1,120p'
echo
echo "== documentation workflow =="
if [ -f .github/workflows/documentation.yml ]; then
cat -n .github/workflows/documentation.yml
fi
echo
echo "== references to documentation workflow and input is-release =="
rg -n "documentation\.yml|--workflow|is-release|pull_request_target|issue_comment|permissions:" .github/workflows .github 2>/dev/null || trueRepository: patternfly/patternfly-react Length of output: 4731 Cover reusable
🤖 Prompt for AI Agents |
||
| uses: actions/checkout@v4 | ||
| - name: Set up and build project | ||
| uses: ./.github/actions/setup-project | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
Do not deploy when the permission-check job fails.
Because
always()is combined withinputs.is-release, a release deployment proceeds even ifcheck-permissionsfails. Requireneeds.check-permissions.result == 'success'; the release flag should bypass only the PR authorization result, not a failed permission check.🤖 Prompt for AI Agents