oh-my-posh/.github/workflows/gomod.yml
dependabot[bot] dbc5da5800 chore: bump actions/setup-go from 5.0.1 to 5.0.2
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 5.0.1 to 5.0.2.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](cdcb360436...0a12ed9d6a)

---
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>
2024-07-11 00:48:03 +00:00

28 lines
718 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@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
with:
go-version: 1.21
cache-dependency-path: src/go.sum
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- 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