Skip to content

Commit 8613df2

Browse files
committed
Managed by Terraform: Update go-validate.yml GitHub workflow
1 parent ef98b25 commit 8613df2

1 file changed

Lines changed: 14 additions & 6 deletions

File tree

.github/workflows/go-validate.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,37 @@
44

55
name: "Go Validate"
66

7-
on: [ workflow_dispatch, push ]
7+
on: [ push ]
88

99
permissions:
1010
contents: read
1111

1212
jobs:
1313
get-go-version:
1414
runs-on: ubuntu-latest
15-
outputs:
16-
go-version: ${{ steps.get-go-version.outputs.go-version }}
1715
steps:
1816
- uses: actions/checkout@v2
1917
- name: 'Determine Go version'
2018
id: get-go-version
2119
run: |
22-
echo "Building with Go $(cat .go-version)"
23-
echo "::set-output name=go-version::$(cat .go-version)"
20+
echo "Found Go $(cat .go-version)"
21+
echo "go-version=$(cat .go-version)" >> $GITHUB_OUTPUT
2422
check-mod-tidy:
23+
needs:
24+
- get-go-version
2525
runs-on: ubuntu-latest
2626
name: Go Mod Tidy
2727
steps:
2828
- uses: actions/checkout@v2
2929
- uses: actions/setup-go@v3
3030
with:
3131
go-version: ${{ needs.get-go-version.outputs.go-version }}
32-
- run: go mod tidy
32+
- run: |
33+
go version
34+
go mod tidy
3335
check-lint:
36+
needs:
37+
- get-go-version
3438
runs-on: ubuntu-latest
3539
name: Lint check
3640
steps:
@@ -43,6 +47,8 @@ jobs:
4347
version: v1.47.3
4448
only-new-issues: true
4549
check-fmt:
50+
needs:
51+
- get-go-version
4652
runs-on: ubuntu-latest
4753
name: Gofmt check
4854
steps:
@@ -59,6 +65,8 @@ jobs:
5965
exit 1; \
6066
fi
6167
check-generate:
68+
needs:
69+
- get-go-version
6270
runs-on: ubuntu-latest
6371
name: Generate check
6472
steps:

0 commit comments

Comments
 (0)