Skip to content

Commit fc751e6

Browse files
authored
Merge pull request #81 from snprajwal/ci
ci: run only on push or PR to main
2 parents dd31035 + 0dc3033 commit fc751e6

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

.github/workflows/tests.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: Build and Deploy
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
48

59
jobs:
610
build-and-deploy:
@@ -20,7 +24,7 @@ jobs:
2024
- name: Set up Go
2125
uses: actions/setup-go@v5
2226
with:
23-
go-version-file: 'go.mod'
27+
go-version-file: "go.mod"
2428

2529
- name: Set up QEMU
2630
uses: docker/setup-qemu-action@v3

.github/workflows/verify.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: verify
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
48

59
jobs:
610
lint:
@@ -11,7 +15,7 @@ jobs:
1115
- name: Set up Go
1216
uses: actions/setup-go@v5
1317
with:
14-
go-version-file: 'go.mod'
18+
go-version-file: "go.mod"
1519

1620
- name: Install ShellCheck and shfmt
1721
run: |
@@ -44,7 +48,7 @@ jobs:
4448
- name: Set up Go
4549
uses: actions/setup-go@v5
4650
with:
47-
go-version-file: 'go.mod'
51+
go-version-file: "go.mod"
4852

4953
- name: verify go.mod/go.sum
5054
run: |
@@ -60,7 +64,7 @@ jobs:
6064
- uses: dorny/paths-filter@v2
6165
id: changes
6266
with:
63-
base: 'main'
67+
base: "main"
6468
filters: |
6569
md:
6670
- 'README.md'

0 commit comments

Comments
 (0)