Skip to content

Commit 439588a

Browse files
authored
Update check changelog worfklow (#133)
Updates the check changelog check to match the newer iteration in other repos, eg: https://github.com/heroku/heroku-buildpack-python/blob/main/.github/workflows/check_changelog.yml Signed-off-by: Ed Morley <[email protected]>
1 parent eb7d2bc commit 439588a

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed
Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
name: Check Changelog
22

3-
on: [pull_request]
3+
on:
4+
pull_request:
5+
types: [opened, reopened, labeled, unlabeled, synchronize]
6+
7+
permissions:
8+
contents: read
49

510
jobs:
6-
build:
7-
runs-on: ubuntu-latest
8-
steps:
9-
- uses: actions/checkout@v1
10-
- name: Check that CHANGELOG is touched
11-
run: |
12-
cat $GITHUB_EVENT_PATH | jq .pull_request.title | grep -i '\[\(\(changelog skip\)\|\(ci skip\)\)\]' || git diff remotes/origin/${{ github.base_ref }} --name-only | grep changelog.md
11+
check-changelog:
12+
runs-on: ubuntu-latest
13+
if: (!contains(github.event.pull_request.labels.*.name, 'skip changelog'))
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
- name: Check that CHANGELOG is touched
18+
run: |
19+
git fetch origin ${{ github.base_ref }} --depth 1 && \
20+
git diff remotes/origin/${{ github.base_ref }} --name-only | grep CHANGELOG.md

0 commit comments

Comments
 (0)