| 1 |
name: changelog |
| 2 |
|
| 3 |
on: |
| 4 |
pull_request: |
| 5 |
types: [opened, synchronize, labeled, unlabeled, reopened] |
| 6 |
|
| 7 |
permissions: |
| 8 |
contents: read |
| 9 |
|
| 10 |
jobs: |
| 11 |
check: |
| 12 |
runs-on: ubuntu-latest |
| 13 |
|
| 14 |
steps: |
| 15 |
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 16 |
with: |
| 17 |
persist-credentials: false |
| 18 |
|
| 19 |
- name: Grep CHANGES.md for PR number |
| 20 |
if: > |
| 21 |
contains(github.event.pull_request.labels.*.name, 'ci: skip news') != true |
| 22 |
run: | |
| 23 |
grep -Pz "\((\n\s*)?#${{ github.event.pull_request.number }}(\n\s*)?\)" CHANGES.md || \ |
| 24 |
(echo "Please add '(#${{ github.event.pull_request.number }})' change line to CHANGES.md (or if appropriate, ask a maintainer to add the 'ci: skip news' label)" && \ |
| 25 |
exit 1) |