Skip to content

Commit 531771d

Browse files
authored
Fix when workflows are run (#8)
These workflows are meant to be run when called, and should not have "on" statements for PR or push (except main, which is checking this repo). This also removes file tox.ini, which was part of an earlier revision and is no longer needed. Signed-off-by: Eric Ball <[email protected]>
1 parent afa1d84 commit 531771d

File tree

6 files changed

+9
-89
lines changed

6 files changed

+9
-89
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,7 @@ name: build
66
# Controls when the action will run. Triggers the workflow on push or pull request
77
# events but only for the master branch
88
on:
9-
push:
10-
branches:
11-
- master
12-
- staging
13-
- main
14-
- develop
15-
pull_request:
16-
branches:
17-
- master
18-
- main
19-
- staging
20-
- develop
9+
workflow_call:
2110

2211
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
2312
jobs:
@@ -53,9 +42,8 @@ jobs:
5342
~\AppData\Local\go-build
5443
key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}
5544
restore-keys: |
56-
${{ runner.os }}-go-${{ matrix.go-version }}-
45+
${{ runner.os }}-go-${{ matrix.go-version }}-
5746
5847
# Run testing on the code
5948
- name: Run building and testing
6049
run: make test
61-

.github/workflows/coverage.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@ name: coverage
55

66

77
on:
8-
push:
9-
branches:
10-
- main
11-
- master
8+
workflow_call:
129

1310
jobs:
1411
coverage:

.github/workflows/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ on:
44
pull_request:
55
branches:
66
- master
7+
- main
78
push:
89
branches:
910
- master
11+
- main
1012

1113
jobs:
1214
license-check:

.github/workflows/push.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@ name: Tag/Publish Release
77

88
# yamllint disable-line rule:truthy
99
on:
10-
push:
11-
branches:
12-
- main
13-
- master
10+
workflow_call:
1411

1512
jobs:
1613
# CAUTION: Other actions depend on this name "tag-github"

.github/workflows/release_tag.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,8 @@
44
name: release-on-tag
55

66
on:
7-
push:
8-
branches:
9-
- master
10-
- main
11-
workflow_run:
12-
workflows: [build]
13-
branches: [main, master]
14-
types:
15-
- completed
7+
workflow_call:
8+
169
jobs:
1710
release:
1811
runs-on: ubuntu-latest
@@ -26,4 +19,4 @@ jobs:
2619
env:
2720
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2821
WITH_V: true
29-
DEFAULT_BUMP: none
22+
DEFAULT_BUMP: none

.github/workflows/tox.ini

Lines changed: 0 additions & 57 deletions
This file was deleted.

0 commit comments

Comments
 (0)