Skip to content

Check if the go.mod and go.sum match the source code

License

Notifications You must be signed in to change notification settings

paulvollmer/action-golang-gosum

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

action-golang-gosum

Check if the go.mod and go.sum match the source code by running go mod tidy and send a Pull Request 🚀

Usage

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 }}

Environment Variables

GITHUB_TOKEN

Required to send the pull request.

COMMIT_MESSAGE

Overwrite the default git commit message.

PR_BRANCH

Overwrite the default git branch to write the git commit to.

PR_TITLE

Overwrite the default pull request title.

PR_MESSAGE

Overwrite the default pull request message.

PR_BASE

Overwrite the default pull request base branch. Default is the master branch.

LET_FAIL

Set to yes to not send a pull request and exit with 1

License

action-golang-gosum is licensed under a MIT License.

About

Check if the go.mod and go.sum match the source code

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published