Check if the go.mod and go.sum match the source code by running go mod tidy
and send a Pull Request 🚀
Create a workflow yaml file .github/workflows/go-mod-tidy.yml
in your repository with the following configuration.
Here you can learn more about creating a workflow file.
name: 'go-mod-tidy'
on:
push:
branches:
- 'master'
paths:
- 'go.mod'
- 'go.sum'
jobs:
fix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: 1.14
- name: tidy
uses: paulvollmer/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Required to send the pull request.
Overwrite the default git commit message.
Overwrite the default git branch to write the git commit to.
Overwrite the default pull request title.
Overwrite the default pull request message.
Overwrite the default pull request base branch. Default is the master
branch.
Set to yes
to not send a pull request and exit with 1
action-golang-gosum
is licensed under a MIT License.