Skip to content

build(deps): bump github.com/sigstore/cosign/v2 from 2.4.1 to 2.6.3 in /tools #1142

build(deps): bump github.com/sigstore/cosign/v2 from 2.4.1 to 2.6.3 in /tools

build(deps): bump github.com/sigstore/cosign/v2 from 2.4.1 to 2.6.3 in /tools #1142

name: Generate changelog entry for Dependabot
on:
pull_request:
types:
- opened
- synchronize
- reopened
permissions:
contents: read
pull-requests: write
jobs:
dependabot-changelog-update:
if: github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- name: Check labels
id: check-labels
uses: actions/github-script@v9
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
- name: Generate a GitHub token
if: steps.check-labels.outputs.result == 'true'
id: github-token
uses: actions/create-github-app-token@v3
with:
app-id: ${{ vars.GH_APP_ID }}
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
repositories: "cli"
- name: Checkout code
if: steps.check-labels.outputs.result == 'true'
uses: actions/checkout@v6
with:
token: ${{ steps.github-token.outputs.token }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- name: Generate changelog entry
if: steps.check-labels.outputs.result == 'true'
uses: dangoslen/dependabot-changelog-helper@v4
with:
activationLabels: dependencies
changelogPath: './CHANGELOG.md'
entryPrefix: 'build(deps): '
- name: Commit changelog entry
if: steps.check-labels.outputs.result == 'true'
uses: stefanzweifel/git-auto-commit-action@v7
with:
commit_message: "docs(CHANGELOG.md): add dependency bump from dependabot"