Skip to content

fix(ci): skip release-please PRs via head_ref check - #1122

Open
mehdi653 wants to merge 1 commit into
CleverCloud:masterfrom
mehdi653:fix/ci-skip-release-please-prs
Open

fix(ci): skip release-please PRs via head_ref check#1122
mehdi653 wants to merge 1 commit into
CleverCloud:masterfrom
mehdi653:fix/ci-skip-release-please-prs

Conversation

@mehdi653

Copy link
Copy Markdown

Summary

Three pull_request workflows used branches-ignore: ['release-please--**'] to skip release-please PRs. On pull_request, that filter matches the base branch (the PR target), not the head branch, so release-please PRs targeting master still triggered these workflows.

Fixes #1110

Change

In code-quality.yml, preview-cleanup.yml, and preview-publish.yml:

  • remove the no-op branches-ignore
  • skip jobs with if: ${{ !startsWith(github.head_ref, 'release-please--') }}

For preview-publish.yml, the condition is only on the build job. The publish job depends on it and is skipped automatically when build is skipped.

Test plan

  • On a normal PR to master, Code quality / Publish preview still run
  • On a release-please PR (head_ref starting with release-please--), those jobs are skipped
  • Preview cleanup on close behaves the same for normal PRs and is skipped for release-please heads

branches-ignore on pull_request filters the base branch, not the head branch,
so release-please PRs targeting master were never skipped. Gate the jobs with
an if condition on github.head_ref instead.

Fixes CleverCloud#1110
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.

branches-ignore: 'release-please--**' doesn't exclude release-please PRs

1 participant