oh-my-posh/.github/workflows/gomod.yml
dependabot[bot] 100cb7abfc chore(deps): bump actions/setup-go from 4.0.0 to 4.0.1
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](4d34df0c23...fac708d667)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-16 06:40:12 +02:00

27 lines
678 B
YAML

name: Go Mod
on: [pull_request]
jobs:
go-mod:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ github.workspace }}/src
steps:
- name: Install Go
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753
with:
go-version: 1.20.2
- name: Checkout code
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: Check for unused dependencies
run: |
go mod tidy
if [ "$(git status | grep -c "nothing to commit, working tree clean")" == "1" ]; then
echo "Nothing to tidy"
exit 0
fi
echo "Go mod tidy is needed"
exit 1