build(deps): bump the github-actions group across 1 directory with 7 updates #367
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Go Mod Tidy Check | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| permissions: | |
| contents: read | |
| jobs: | |
| go_mod_tidy_check: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | |
| with: | |
| go-version: "stable" | |
| - name: Check go.mod and go.sum in main directory | |
| run: | | |
| # Store original file state | |
| cp go.mod go.mod.orig | |
| cp go.sum go.sum.orig | |
| # Run go mod tidy | |
| go mod tidy | |
| # Check if files changed | |
| if ! diff -q go.mod.orig go.mod > /dev/null 2>&1; then | |
| echo "ERROR: go.mod in main directory has changed after running 'go mod tidy'" | |
| echo "Please run 'go mod tidy' locally and commit the changes" | |
| diff go.mod.orig go.mod | |
| exit 1 | |
| fi | |
| if ! diff -q go.sum.orig go.sum > /dev/null 2>&1; then | |
| echo "ERROR: go.sum in main directory has changed after running 'go mod tidy'" | |
| echo "Please run 'go mod tidy' locally and commit the changes" | |
| diff go.sum.orig go.sum | |
| exit 1 | |
| fi | |
| echo "SUCCESS: go.mod and go.sum in main directory are tidy" | |
| - name: Check go.mod and go.sum in test directory | |
| run: | | |
| cd test | |
| # Store original file state | |
| cp go.mod go.mod.orig | |
| cp go.sum go.sum.orig | |
| # Run go mod tidy | |
| go mod tidy | |
| # Check if files changed | |
| if ! diff -q go.mod.orig go.mod > /dev/null 2>&1; then | |
| echo "ERROR: go.mod in test directory has changed after running 'go mod tidy'" | |
| echo "Please run 'go mod tidy' locally and commit the changes" | |
| diff go.mod.orig go.mod | |
| exit 1 | |
| fi | |
| if ! diff -q go.sum.orig go.sum > /dev/null 2>&1; then | |
| echo "ERROR: go.sum in test directory has changed after running 'go mod tidy'" | |
| echo "Please run 'go mod tidy' locally and commit the changes" | |
| diff go.sum.orig go.sum | |
| exit 1 | |
| fi | |
| echo "SUCCESS: go.mod and go.sum in test directory are tidy" |