Skip to content

Commit

Permalink
Create mod-tidy.yml
Browse files Browse the repository at this point in the history
Signed-off-by: Drewry Pope <drewrypope@gmail.com>
  • Loading branch information
dezren39 authored Nov 7, 2023
1 parent 850a0e1 commit 40e593e
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/mod-tidy.yml
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

0 comments on commit 40e593e

Please sign in to comment.