Skip to content

Check Go module tidiness in GitHub Actions

License

Notifications You must be signed in to change notification settings

zencargo/github-action-go-mod-tidy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

github-action-go-mod-tidy

This action checks the tidiness of a Go module.

Example usage

Until GitHub Actions supports uses in composite actions, you'll need to add actions/cache before this action.

- uses: actions/cache@v2
  with:
    path: ~/go/pkg/mod
    key: go-mod-${{ hashFiles('**/go.sum') }}
    restore-keys: |
      go-mod-

- uses: zencargo/github-action-go-mod-tidy@v1
  with:
    path: my/go/module
    go-version: 1.15

Inputs

path

Required, default: .

Path of the module to check, relative to the GitHub workspace.

go-version

Required, default: 1

Version of the golang -alpine Docker image to use.