Periodic offering to the CI lint gods: Phase 4 #15404
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
| # Copyright IBM Corp. 2014, 2026 | |
| # "SPDX-License-Identifier: MPL-2.0" | |
| name: Generate CHANGELOG | |
| on: | |
| pull_request: | |
| types: [closed] | |
| workflow_dispatch: | |
| jobs: | |
| GenerateChangelog: | |
| if: github.event.pull_request.merged || github.event_name == 'workflow_dispatch' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1 | |
| id: app-token | |
| with: | |
| app-id: ${{ secrets.APP_ID }} | |
| private-key: ${{ secrets.APP_PEM }} | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ steps.app-token.outputs.token }} | |
| - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 | |
| with: | |
| go-version-file: .ci/tools/go.mod | |
| - run: cd .ci/tools && go install github.com/hashicorp/go-changelog/cmd/changelog-build | |
| - run: ./.ci/scripts/generate-changelog.sh | |
| - run: | | |
| if [[ `git status --porcelain` ]]; then | |
| if ${{github.event_name == 'workflow_dispatch'}}; then | |
| MSG="Update CHANGELOG.md (Manual Trigger)" | |
| else | |
| MSG="Update CHANGELOG.md for #${{ github.event.pull_request.number }}" | |
| fi | |
| git config --local user.email changelogbot@hashicorp.com | |
| git config --local user.name changelogbot | |
| git add CHANGELOG.md | |
| git commit -m "$MSG" | |
| git push | |
| fi |