MM-52712: Prevent CI cancellation in master (round 2) (#23293)
We discovered that cancel-in-progress only controls in-progress jobs. Which means that pending jobs will _always_ be cancelled regardless. There is an open discussion: https://github.com/orgs/community/discussions/5435 which was closed saying this is how the feature is designed. We try to work around this by refactoring into separate reusable workflows and having concurrency only for PR workflows. ```release-note NONE ``` Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
11b08edf94
Коммит
77a24f96d6
19
.github/workflows/server-ci-pr.yml
поставляемый
Обычный файл
19
.github/workflows/server-ci-pr.yml
поставляемый
Обычный файл
@@ -0,0 +1,19 @@
|
||||
name: Server CI PR
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
go-version: "1.19.5"
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
# This file just imports the template yml
|
||||
# and runs it with concurrency. We have to do this in this way
|
||||
# because the concurrency label cannot be added conditionally
|
||||
# and it _always_ cancels pending workflows. So master CI builds
|
||||
# always kept getting canceled.
|
||||
|
||||
jobs:
|
||||
pr-ci:
|
||||
uses: ./.github/workflows/server-ci-template.yml
|
||||
Ссылка в новой задаче
Block a user