Skip to content

Build: Don't auto-trigger CI on release PRs#23198

Merged
JReinhold merged 5 commits into
nextfrom
release-tooling-simpler-ci
Jun 23, 2023
Merged

Build: Don't auto-trigger CI on release PRs#23198
JReinhold merged 5 commits into
nextfrom
release-tooling-simpler-ci

Conversation

@JReinhold
Copy link
Copy Markdown
Contributor

What I did

We don't want to trigger CI on any updates to release PRs because they update frequently and it's a waste to run CI before we actually are ready for the release process.

Now the Releaser have to manually add the ci:daily label to trigger CI on changes.

How to test

Checklist

  • Make sure your changes are tested (stories and/or unit, integration, or end-to-end tests)
  • Make sure to add/update documentation regarding your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Maintainers

  • If this PR should be tested against many or all sandboxes,
    make sure to add the ci:merged or ci:daily GH label to it.
  • Make sure this PR contains one of the labels below.

["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]

@JReinhold JReinhold self-assigned this Jun 23, 2023
@JReinhold JReinhold added patch:yes Bugfix & documentation PR that need to be picked to main branch build Internal-facing build tooling & test updates labels Jun 23, 2023
@JReinhold JReinhold requested a review from kasperpeulen June 23, 2023 11:16
Comment on lines -12 to -13
- version-prerelease-from-**
- version-patch-from-**
Copy link
Copy Markdown
Contributor Author

@JReinhold JReinhold Jun 23, 2023

Choose a reason for hiding this comment

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

we don't need this as it should already be covered by "pull_request_target" > "synchronize", and removing these makes sure the "merged" workflow doesn't trigger unnecessarily.

runs-on: ubuntu-latest
needs: get-branch
if: github.event_name == 'pull_request_target' && ((github.event.pull_request.draft == false || contains(github.event.pull_request.labels.*.name, 'ci:pr')) && !contains(github.event.pull_request.labels.*.name, 'ci:merged') && !contains(github.event.pull_request.labels.*.name, 'ci:daily'))
if: github.event_name == 'pull_request_target' && (((github.event.pull_request.draft == false && !contains(github.event.pull_request.labels.*.name, 'release')) || contains(github.event.pull_request.labels.*.name, 'ci:pr')) && !contains(github.event.pull_request.labels.*.name, 'ci:merged') && !contains(github.event.pull_request.labels.*.name, 'ci:daily'))
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

trigger PR tests if:

  1. is "pull_request_target" event
  2. AND
    1. (not draft
    2. AND not "release")
    3. OR has "ci:pr" label
  3. AND don't have "ci:merged"
  4. AND don't have "ci:daily"

Copy link
Copy Markdown
Member

@kasperpeulen kasperpeulen left a comment

Choose a reason for hiding this comment

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

LGTM!

@JReinhold JReinhold merged commit 1d61076 into next Jun 23, 2023
@JReinhold JReinhold deleted the release-tooling-simpler-ci branch June 23, 2023 14:44
JReinhold added a commit that referenced this pull request Jun 23, 2023
Build: Don't auto-trigger CI on release PRs
(cherry picked from commit 1d61076)
JReinhold added a commit that referenced this pull request Jun 23, 2023
Build: Don't auto-trigger CI on release PRs
(cherry picked from commit 1d61076)
JReinhold added a commit that referenced this pull request Jun 24, 2023
Build: Don't auto-trigger CI on release PRs
(cherry picked from commit 1d61076)
JReinhold added a commit that referenced this pull request Jun 26, 2023
Build: Don't auto-trigger CI on release PRs
(cherry picked from commit 1d61076)
JReinhold added a commit that referenced this pull request Jun 26, 2023
Build: Don't auto-trigger CI on release PRs
(cherry picked from commit 1d61076)
JReinhold added a commit that referenced this pull request Jun 26, 2023
JReinhold added a commit that referenced this pull request Jun 27, 2023
Build: Don't auto-trigger CI on release PRs
(cherry picked from commit 1d61076)
JReinhold added a commit that referenced this pull request Jun 27, 2023
Build: Don't auto-trigger CI on release PRs
(cherry picked from commit 1d61076)
JReinhold added a commit that referenced this pull request Jun 27, 2023
Build: Don't auto-trigger CI on release PRs
(cherry picked from commit 1d61076)
JReinhold added a commit that referenced this pull request Jun 27, 2023
Build: Don't auto-trigger CI on release PRs
(cherry picked from commit 1d61076)
@JReinhold JReinhold added the patch:done Patch/release PRs already cherry-picked to main/release branch label Jun 27, 2023
@ndelangen ndelangen removed the patch:yes Bugfix & documentation PR that need to be picked to main branch label Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Internal-facing build tooling & test updates patch:done Patch/release PRs already cherry-picked to main/release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants