Bump actions/upload-artifact from 4.6.2 to 5.0.0 #4573
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 Check | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened, labeled, unlabeled] | |
| jobs: | |
| changelog-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| fetch-depth: 2 # Only need preceeding commit | |
| - name: Check for no-changelog label | |
| id: label-check | |
| uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 | |
| with: | |
| script: | | |
| const payload = context.payload; | |
| const label = !!payload.pull_request.labels.find(l => l.name === 'no-changelog'); | |
| core.setOutput('has_label', label.toString()); | |
| - name: Check if CHANGELOG.md was modified | |
| id: changelog-check | |
| if: steps.label-check.outputs.has_label == 'false' | |
| run: | | |
| if git diff --quiet HEAD^ -- CHANGELOG.md; then | |
| echo "any_changed=false" >> $GITHUB_OUTPUT | |
| else | |
| echo "any_changed=true" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Assert CHANGELOG.md is modified | |
| uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 | |
| if: steps.label-check.outputs.has_label == 'false' && steps.changelog-check.outputs.any_changed != 'true' | |
| with: | |
| script: | | |
| core.setFailed("No changes to CHANGELOG.md detected. Add 'no-changelog' label if this is intentional.") | |