Change top bar health-check icon #85
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: Changelog Verifier | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| verify-changelog: | |
| runs-on: ubuntu-24.04 | |
| if: github.event.pull_request.draft == false | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| steps: | |
| - name: Check for no-changelog label | |
| id: skip-check | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| REPO: ${{ github.repository }} | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| run: | | |
| if gh pr view "$PR_NUMBER" --repo "$REPO" --json labels --jq '.labels[].name' | grep -qx 'no-changelog'; then | |
| echo "skip=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "skip=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Verify CHANGELOG.md was updated | |
| if: steps.skip-check.outputs.skip == 'false' | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| REPO: ${{ github.repository }} | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| run: | | |
| changed_files=$(gh pr diff "$PR_NUMBER" --repo "$REPO" --name-only) | |
| if ! grep -qx 'CHANGELOG.md' <<< "$changed_files"; then | |
| echo "::error::This PR does not modify CHANGELOG.md. Add a changelog entry or apply the 'no-changelog' label to skip this check." | |
| exit 1 | |
| fi | |
| echo "CHANGELOG.md was updated." |