Skip to content

Commit

Permalink
ci(compability-check): checks go.mod integrity (#6015)
Browse files Browse the repository at this point in the history
Signed-off-by: Dwi Siswanto <[email protected]>
  • Loading branch information
dwisiswant0 authored Jan 31, 2025
1 parent 265051f commit 69870fe
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/compability-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,19 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
permissions:
contents: write
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: projectdiscovery/actions/setup/git@v1
- uses: projectdiscovery/actions/setup/go@v1
- run: go mod download && go mod verify && go vet ./...
- name: Checks go.mod Integrity
run: |
git diff --exit-code go.mod >/dev/null || {
echo "::warning::go.mod is out of sync. Pushing changes to the branch."
git add go.{mod,sum}
git commit -m "chore(deps): go mod tidy"
git push origin $GITHUB_REF
}

0 comments on commit 69870fe

Please sign in to comment.