build(deps): bump the go-dependencies group in /tools with 20 updates #1327
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: Generate changelog entry for Dependabot | |
| on: | |
| pull_request: | |
| # This job should only run when the PR is first opened, not when | |
| # additional commits are pushed to its branch (which is done by | |
| # this workflow, or by someone using the GitHub web interface | |
| # 'Update Branch' button). Thus the 'types' list here contains | |
| # only 'opened', and does not contain 'synchronize' or 'labeled'. | |
| types: | |
| - opened | |
| # Jobs in this workflow which require GITHUB_TOKEN to have permissions | |
| # specify that at the job level. | |
| permissions: {} | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| check-labels: | |
| if: github.event.pull_request.user.login == 'dependabot[bot]' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: write # add the Skip-Changelog label when the PR doesn't need an entry | |
| outputs: | |
| need_changelog_entry: ${{ steps.check.outputs.result == 'true' }} | |
| steps: | |
| - name: Check labels | |
| id: check | |
| uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 | |
| with: | |
| script: | | |
| const labels = context.payload.pull_request.labels.map(l => l.name); | |
| const skip = labels.includes('tools') || labels.includes('github_actions'); | |
| if (skip) { | |
| await github.rest.issues.addLabels({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.payload.pull_request.number, | |
| labels: ['Skip-Changelog'] | |
| }); | |
| } | |
| return !skip; | |
| result-encoding: string | |
| dependabot-changelog-update: | |
| needs: check-labels | |
| if: needs.check-labels.outputs.need_changelog_entry == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Generate a GitHub token | |
| id: github-token | |
| uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 | |
| with: | |
| app-id: ${{ vars.GH_APP_ID }} | |
| private-key: ${{ secrets.GH_APP_PRIVATE_KEY }} | |
| owner: ${{ github.repository_owner }} | |
| repositories: ${{ github.repository }} | |
| permission-contents: write | |
| - name: Checkout code | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| token: ${{ steps.github-token.outputs.token }} | |
| persist-credentials: true | |
| - name: Generate changelog entry | |
| uses: dangoslen/dependabot-changelog-helper@291c8cb629d7cd7b57ea065782c435ec2bedb138 # v4.3.0 | |
| with: | |
| activationLabels: dependencies | |
| changelogPath: './CHANGELOG.md' | |
| entryPrefix: 'build(deps): ' | |
| - name: Commit changelog entry | |
| uses: stefanzweifel/git-auto-commit-action@04702edda442b2e678b25b537cec683a1493fcb9 # v7.1.0 | |
| with: | |
| commit_message: "docs(CHANGELOG.md): add dependency bump from Dependabot" |