Skip to content

Commit c900ad8

Browse files
authored
build: update concurrency group and triggers (#1198)
1 parent 93b5721 commit c900ad8

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

.github/workflows/lint.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,15 @@
1313
# limitations under the License.
1414
---
1515
name: Lint
16-
on: [push, pull_request, workflow_dispatch]
16+
on:
17+
push:
18+
branches:
19+
- main
20+
pull_request:
1721
jobs:
1822
lint:
1923
concurrency:
20-
group: ${{ github.head_ref || github.ref }}
24+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.head_ref || github.ref }}
2125
cancel-in-progress: true
2226
runs-on: ubuntu-20.04
2327
steps:

.github/workflows/test.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,15 @@
1313
# limitations under the License.
1414

1515
name: Test
16-
on: [push, pull_request]
16+
on:
17+
push:
18+
branches:
19+
- main
20+
pull_request:
1721
jobs:
1822
test:
1923
concurrency:
20-
group: ${{ github.head_ref || github.ref }}
24+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.head_ref || github.ref }}
2125
cancel-in-progress: true
2226
runs-on: ubuntu-latest
2327
steps:

0 commit comments

Comments
 (0)