at-wat / go-sum-fix-action

GitHub Action to update go.sum. (Mainly for working with Renovate Bot which sometimes lacks package sum.)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

go-sum-fix-action

GitHub Action to update go.sum.

Updates

v0.3.0

Since v0.3.0, go-sum-fix-action fails if previous commit is not tidied. This is to prevent causing infinite loop of force-push by Renovate bot and go-sum-fix-action.

v0.8.0

update_import_path option is deprecated and will be removed in a future release. Use Renovate gomodUpdateImportPaths option instead. (postUpdateOptions)

  "postUpdateOptions": ["gomodUpdateImportPaths", "gomodTidy"]

Example

Example to automatically fix go.sum in Renovate Bot's pull requests.

name: go-mod-fix
on:
  push:
    branches:
      - renovate/*

jobs:
  go-mod-fix:
    runs-on: ubuntu-latest
    steps:
      - name: checkout
        uses: actions/checkout@v2
        with:
          fetch-depth: 2
      - name: fix
        uses: at-wat/go-sum-fix-action@v0
        with:
          git_user: @@MAINTAINER_NAME@@
          git_email: @@MAINTAINER_EMAIL_ADDRESS@@
          github_token: ${{ secrets.GITHUB_TOKEN }}
          commit_style: squash
          push: force

About

GitHub Action to update go.sum. (Mainly for working with Renovate Bot which sometimes lacks package sum.)

License:Apache License 2.0


Languages

Language:Shell 93.8%Language:Go 4.3%Language:Dockerfile 1.9%