Skip to content

Commit d334208

Browse files
committed
Enhance changelog verifier script
Signed-off-by: Kunal Kotwani <[email protected]>
1 parent 1869680 commit d334208

File tree

1 file changed

+28
-4
lines changed

1 file changed

+28
-4
lines changed
Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,43 @@
11
name: "Changelog Verifier"
22
on:
33
pull_request:
4-
types: [opened, edited, review_requested, synchronize, reopened, ready_for_review, labeled, unlabeled]
4+
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]
55

66
jobs:
77
# Enforces the update of a changelog file on every pull request
8-
verify-changelog:
9-
if: github.repository == 'opensearch-project/OpenSearch'
8+
verify-changelog-3x:
9+
# if: github.repository == 'opensearch-project/OpenSearch'
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v4
1313
with:
1414
token: ${{ secrets.GITHUB_TOKEN }}
1515
ref: ${{ github.event.pull_request.head.sha }}
16-
1716
- uses: dangoslen/changelog-enforcer@v3
1817
with:
1918
skipLabels: "autocut, skip-changelog"
19+
changeLogPath: 'CHANGELOG-3.0.md'
20+
verify-changelog-2x:
21+
# if: github.repository == 'opensearch-project/OpenSearch' && needs.verify-changelog-3x.result == 'failure'
22+
if: always()
23+
runs-on: ubuntu-latest
24+
needs: [ verify-changelog-3x ]
25+
steps:
26+
- uses: actions/checkout@v4
27+
with:
28+
token: ${{ secrets.GITHUB_TOKEN }}
29+
ref: ${{ github.event.pull_request.head.sha }}
30+
- uses: dangoslen/changelog-enforcer@v3
31+
with:
32+
skipLabels: "autocut, skip-changelog"
33+
changeLogPath: 'CHANGELOG-2.0.md'
34+
overall-status:
35+
# if: github.repository == 'opensearch-project/OpenSearch'
36+
runs-on: ubuntu-latest
37+
needs: [ verify-changelog-3x, verify-changelog-2x ]
38+
steps:
39+
- name: Check job statuses
40+
run: |
41+
if [[ ${{ needs.verify-changelog-3x.result }} == 'failure' && ${{ needs.verify-changelog-2x.result }} == 'failure' ]]; then
42+
exit 1
43+
fi

0 commit comments

Comments
 (0)