Skip to content

Commit

Permalink
Group workflow by branch except main.
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed Jun 3, 2021
1 parent 7683fb5 commit 6e2809c
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/angular.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@

name: Angular
concurrency:
group: angular-${{ github.head_ref || github.sha }}
# Group PRs by head_ref, push to main branch by commit id, and others branch by ref.
group: angular-${{ github.head_ref || (github.ref == 'refs/heads/main' && github.sha) || github.ref }}
cancel-in-progress: true
on:
push:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@

name: Generator
concurrency:
group: generator-${{ github.head_ref || github.sha }}
# Group PRs by head_ref, push to main branch by commit id, and others branch by ref.
group: generator-${{ github.head_ref || (github.ref == 'refs/heads/main' && github.sha) || github.ref }}
cancel-in-progress: true
on:
push:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/gradle-wrapper-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@

name: 'Validate Gradle Wrapper'
concurrency:
group: gradle-${{ github.head_ref || github.sha }}
# Group PRs by head_ref, push to main branch by commit id, and others branch by ref.
group: gradle-${{ github.head_ref || (github.ref == 'refs/heads/main' && github.sha) || github.ref }}
cancel-in-progress: true
on:
push:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/incremental-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@

name: Incremental Changelog
concurrency:
group: incremental-${{ github.head_ref || github.sha }}
# Group PRs by head_ref, push to main branch by commit id, and others branch by ref.
group: incremental-${{ github.head_ref || (github.ref == 'refs/heads/main' && github.sha) || github.ref }}
cancel-in-progress: true
on:
push:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/jdl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@

name: JDL tests
concurrency:
group: jdl-${{ github.head_ref || github.sha }}
# Group PRs by head_ref, push to main branch by commit id, and others branch by ref.
group: jdl-${{ github.head_ref || (github.ref == 'refs/heads/main' && github.sha) || github.ref }}
cancel-in-progress: true
on:
push:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/react.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@

name: React
concurrency:
group: react-${{ github.head_ref || github.sha }}
# Group PRs by head_ref, push to main branch by commit id, and others branch by ref.
group: react-${{ github.head_ref || (github.ref == 'refs/heads/main' && github.sha) || github.ref }}
cancel-in-progress: true
on:
push:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/vue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@

name: Vue
concurrency:
group: vue-${{ github.head_ref || github.sha }}
# Group PRs by head_ref, push to main branch by commit id, and others branch by ref.
group: vue-${{ github.head_ref || (github.ref == 'refs/heads/main' && github.sha) || github.ref }}
cancel-in-progress: true
on:
push:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/webflux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@

name: Webflux
concurrency:
group: webflux-${{ github.head_ref || github.sha }}
# Group PRs by head_ref, push to main branch by commit id, and others branch by ref.
group: webflux-${{ github.head_ref || (github.ref == 'refs/heads/main' && github.sha) || github.ref }}
cancel-in-progress: true
on:
push:
Expand Down

0 comments on commit 6e2809c

Please sign in to comment.