| 1 | name: examples |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | branches: |
| 6 | - "master" |
| 7 | paths: |
| 8 | - ".github/workflows/examples.yml" |
| 9 | - "./examples/go.mod" |
| 10 | - "./examples/go.sum" |
| 11 | - "./go.mod" |
| 12 | - "./go.sum" |
| 13 | workflow_dispatch: {} |
| 14 | |
| 15 | jobs: |
| 16 | tidy: |
| 17 | permissions: |
| 18 | contents: write |
| 19 | runs-on: ubuntu-latest |
| 20 | steps: |
| 21 | - uses: actions/checkout@v5 |
| 22 | - uses: actions/setup-go@v6 |
| 23 | with: |
| 24 | go-version: "^1" |
| 25 | cache: true |
| 26 | - shell: bash |
| 27 | run: | |
| 28 | (cd ./examples && go mod tidy) |
| 29 | (cd ./tutorials && go mod tidy) |
| 30 | - uses: stefanzweifel/git-auto-commit-action@v7 |
| 31 | with: |
| 32 | commit_message: "chore: go mod tidy tutorials and examples" |
| 33 | branch: master |
| 34 | commit_user_name: actions-user |
| 35 | commit_user_email: [email protected] |