A Github Action that checks for Go upgrades and modifies the go.mod file accordingly.
MIT License
A Github Action that checks for Go upgrades and modifies the go.mod
file accordingly.
- uses: StefMa/Upgrade-Go-Action@main
with:
base-branch: 'master' # Defaults to 'main' if absent
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
It is like Dependabot or the Gradle Wrapper Upgrade Gradle Plugin. You shouldn't really care about the Go version as long as you don't build a Go library. You can always be on the bleeding edge 🙂
So, why not?
A fully working example can bn seen below. It make sense to run this Action periodically to check for new Go versions.
name: Upgrade Go
on:
workflow_dispatch:
schedule:
- cron: "0 8 * * MON"
jobs:
upgrade-go:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: StefMa/Upgrade-Go-Action@main
with:
base-branch: 'master'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Full a full-reference, checkout the action.yml
file.
base-branch The (base) branch where the PR will be created against at. Default is main.
git clone ...
)npm
npm install
npm run build