-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Drewry Pope <drewrypope@gmail.com>
- Loading branch information
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Go Mod Tidy and Commit | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
paths-ignore: | ||
- '**.md' # Ignore markdown files changes | ||
|
||
jobs: | ||
tidy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: '1.18' # Specify the Go version | ||
|
||
- name: Tidy Go modules | ||
run: go mod tidy | ||
|
||
- name: Generate Go files | ||
run: go generate ./... | ||
|
||
- name: Auto commit changes | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: 'Maintain: Update go.mod and generated files' | ||
branch: ${{ github.ref }} | ||
file_pattern: sources/graph/go.mod sources/graph/go.sum # Add other paths that might have changed due to go generate |