fix(ci): skip release-please PRs via head_ref check - #1122
Open
mehdi653 wants to merge 1 commit into
Open
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three
pull_requestworkflows usedbranches-ignore: ['release-please--**']to skip release-please PRs. Onpull_request, that filter matches the base branch (the PR target), not the head branch, so release-please PRs targetingmasterstill triggered these workflows.Fixes #1110
Change
In
code-quality.yml,preview-cleanup.yml, andpreview-publish.yml:branches-ignoreif: ${{ !startsWith(github.head_ref, 'release-please--') }}For
preview-publish.yml, the condition is only on thebuildjob. Thepublishjob depends on it and is skipped automatically whenbuildis skipped.Test plan
master, Code quality / Publish preview still runhead_refstarting withrelease-please--), those jobs are skipped