Skip to content

fix(workflow): fix release deploy - #12598

Open
kmcfaul wants to merge 1 commit into
patternfly:mainfrom
kmcfaul:gh-workflow
Open

fix(workflow): fix release deploy#12598
kmcfaul wants to merge 1 commit into
patternfly:mainfrom
kmcfaul:gh-workflow

Conversation

@kmcfaul

@kmcfaul kmcfaul commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

What: Closes #12540

It seems that github.event_name == 'workflow_call' doesn't return true when the release workflow steps run (event_name evaluates to 'push'). Refactored to instead explicitly pipe a flag for the release workflow.

Assisted by Cursor AI.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The reusable documentation workflow now accepts an is-release input. Release runs set this input to true, allowing deployment and release-specific checkout behavior without relying on the workflow event name.

Changes

Release documentation deployment

Layer / File(s) Summary
Documentation workflow release gating
.github/workflows/documentation.yml
Adds the optional boolean is-release input and uses it to permit deployment and control the checkout step.
Release workflow input wiring
.github/workflows/release.yml
Passes is-release: true to the reusable documentation workflow during release runs.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: rebeccaalpert

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The workflow changes address #12540 by ensuring the release workflow reaches permission checks and the deploy step instead of skipping them.
Out of Scope Changes check ✅ Passed The changes stay focused on the release/documentation workflow wiring needed for deployment and do not introduce unrelated scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is relevant and clearly indicates a fix for the release deployment workflow, which matches the changeset.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/documentation.yml:
- Line 32: Update the deployment condition in the workflow to require
needs.check-permissions.result == 'success' for all deployments, while allowing
inputs.is-release to bypass only the authorization output check. Preserve the
existing non-release permission requirement and prevent deployment when the
check-permissions job fails.
- Line 48: Update the checkout permission-gating logic in the documentation
workflow so reusable calls with is-release set to false still perform a
checkout; add the fallback condition (!github.event_name || inputs.is-release),
or explicitly include every supported non-release caller while preserving
existing pull_request_target and issue_comment behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2f0319d3-cc44-421c-bdc6-2b4c0dd9a1b2

📥 Commits

Reviewing files that changed from the base of the PR and between c4086a0 and dcb04cc.

📒 Files selected for processing (2)
  • .github/workflows/documentation.yml
  • .github/workflows/release.yml

always() &&
!cancelled() &&
(github.event_name == 'workflow_call' || needs.check-permissions.outputs.allowed == 'true')
(inputs.is-release || needs.check-permissions.outputs.allowed == 'true')

Copy link
Copy Markdown

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 with inputs.is-release, a release deployment proceeds even if check-permissions fails. Require needs.check-permissions.result == 'success'; the release flag should bypass only the PR authorization result, not a failed permission check.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/documentation.yml at line 32, Update the deployment
condition in the workflow to require needs.check-permissions.result == 'success'
for all deployments, while allowing inputs.is-release to bypass only the
authorization output check. Preserve the existing non-release permission
requirement and prevent deployment when the check-permissions job fails.


- name: Check out project
if: github.event_name == 'workflow_call'
if: inputs.is-release

Copy link
Copy Markdown

Choose a reason for hiding this comment

The 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 || true

Repository: patternfly/patternfly-react

Length of output: 4731


Cover reusable is-release: false call sites.

documentation.yml only auto-checks out pull_request_target and issue_comment; manual non-release reusable workflow calls get past permission gating but run without checkout. Add a fallback checkout guarded by (!github.event_name || inputs.is-release) or explicitly cover each supported caller.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/documentation.yml at line 48, Update the checkout
permission-gating logic in the documentation workflow so reusable calls with
is-release set to false still perform a checkout; add the fallback condition
(!github.event_name || inputs.is-release), or explicitly include every supported
non-release caller while preserving existing pull_request_target and
issue_comment behavior.

@nicolethoen
nicolethoen self-requested a review July 28, 2026 15:13
@kmcfaul
kmcfaul requested a review from dlabaj July 28, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug - workflow - Release workflow skips deploy step

1 participant