Skip to content

Commit 03d0a03

Browse files
authored
Use 'on' in favor of 'if' for gh action workflows (#711)
Signed-off-by: Yuki Iwai <[email protected]>
1 parent c637101 commit 03d0a03

File tree

3 files changed

+25
-11
lines changed

3 files changed

+25
-11
lines changed

.github/workflows/golangci-lint.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
name: golangci-lint
22
on:
33
push:
4-
tags:
5-
- v*
64
branches:
7-
- master
5+
- "master"
6+
- "release-*"
7+
tags:
8+
- "v*"
89
pull_request:
10+
branches:
11+
- "master"
12+
- "release-*"
13+
914
jobs:
1015
golangci:
1116
name: lint

.github/workflows/main.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
name: build
2-
on: [push, pull_request]
2+
on:
3+
push:
4+
branches:
5+
- "master"
6+
- "release-*"
7+
tags:
8+
- "v*"
9+
pull_request:
10+
branches:
11+
- "master"
12+
- "release-*"
13+
314
jobs:
415
validate:
516
name: Validate
@@ -9,8 +20,6 @@ jobs:
920
defaults:
1021
run:
1122
working-directory: ${{ env.GOPATH }}/src/github.com/kubeflow/mpi-operator
12-
# Pull requests from the same repository won't trigger this checks as they were already triggered by the push
13-
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
1423
steps:
1524
- name: Clone the code
1625
uses: actions/checkout@v3
@@ -34,8 +43,6 @@ jobs:
3443
name: E2E
3544
runs-on:
3645
labels: ubuntu-latest-16-cores
37-
# Pull requests from the same repository won't trigger this checks as they were already triggered by the push
38-
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
3946
strategy:
4047
fail-fast: false
4148
matrix:

.github/workflows/mpi-operator-docker-image-publish.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@ name: build and publish mpi multi-arch docker image
33
on:
44
push:
55
branches:
6-
- "master"
6+
- "master"
7+
- "release-*"
78
tags:
8-
- "v*"
9+
- "v*"
910
pull_request:
1011
branches:
11-
- "master"
12+
- "master"
13+
- "release-*"
1214

1315
env:
1416
IMAGE_NAME: mpioperator/mpi-operator

0 commit comments

Comments
 (0)