fix(deps): bump the external group across 1 directory with 20 updates #7372
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: 👋 Friendly Reminders | |
| on: | |
| pull_request: | |
| branches: main | |
| permissions: {} | |
| jobs: | |
| friendly-reminder: | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 | |
| with: | |
| go-version-file: "service/go.mod" | |
| - name: Check Go Mod Tidy | |
| id: go-mod-tidy | |
| run: | | |
| # iterate over work file, cd and run go mod tidy | |
| while IFS="" read -r line || [ -n "$line" ]; do | |
| (cd "$line" && go mod tidy) | |
| done < <(go work edit --json | jq -r '.Use.[].DiskPath') | |
| # check if any changes were made | |
| git status --porcelain >>"$GITHUB_OUTPUT" | |
| - name: Post comment if go.mod was changed | |
| if: steps.go-mod-tidy.outputs.stdout != '' | |
| uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 | |
| with: | |
| script: | | |
| github.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: '👋 Friendly reminder: go.mod was changed. Make sure to run `go mod tidy`!\n\n' + | |
| '```\n$GO_MOD_TIDY_OUTPUT\n```' | |
| }) | |
| env: | |
| GO_MOD_TIDY_OUTPUT: ${{ steps.go-mod-tidy.outputs.stdout }} |