ci: Run push CI on mainlines only to stop double-triggering PRs#125
Open
DanielKellerM wants to merge 1 commit into
Open
ci: Run push CI on mainlines only to stop double-triggering PRs#125DanielKellerM wants to merge 1 commit into
DanielKellerM wants to merge 1 commit into
Conversation
An open same-repo PR fires both the push and pull_request events, so the gitlab-ci job mirrors the same commit twice; the second mirror cancels the first GitLab pipeline (observed as a child pipeline with all jobs skipped). Scope push to devel/master so feature branches run CI once, via their PR (pull_request synchronize still reruns on every pushed commit). Also stops the spurious __deploy__ pipelines the deploy job created on feature pushes.
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.
Problem
An open same-repo PR fires both the
pushandpull_requestevents. Thegitlab-cijob then mirrors the same commit to GitLab twice, and the second mirror cancels the first GitLab pipeline — observed as a child pipeline with all jobs skipped (the100 skipped/unknown_failuresignature), failinggitlab-ci / checkon every PR whiledevel(single push event) stays healthy.Fix
Scope
pushtodevel/master. Feature branches validate via their PR:pull_request: synchronizereruns the full CI (incl.gitlab-ci) once. Push-to-retrigger still works.gh run rerun/ Actions UI /workflow_dispatch, unchanged.workflow_dispatch.Bonus: also stops the spurious
__deploy__<sha>__<feature-branch>pipelines thedeployjob created on every feature-branch push (deployisif: github.event_name == 'push', now mainline-only).