-
Notifications
You must be signed in to change notification settings - Fork 4.8k
47 lines (41 loc) · 1.33 KB
/
changelog.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Changelog
on:
pull_request:
types: [ "opened", "synchronize", "labeled", "unlabeled" ]
paths:
- 'kong/**'
- '**.rockspec'
- '.requirements'
jobs:
require-changelog:
name: Is changelog required?
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Retrives changed files in CHANGELOG/unreleased/**/*.yaml
id: changelog-check
uses: tj-actions/changed-files@5817a9efb0d7cc34b917d8146ea10b9f32044968 # v37
with:
files: 'CHANGELOG/unreleased/**/*.yaml'
- name: Requires a changelog file if 'skip-changelog' label is not added
if: ${{ !contains(github.event.*.labels.*.name, 'skip-changelog') }}
run: >
if [ "${{ steps.changelog-check.outputs.added_files_count }}" = "0" ]; then
echo "PR should contain a changelog file"
exit 1
fi
validate-changelog:
name: Validate changelog
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Validate changelogs
uses: thiagodnf/yaml-schema-checker@228a5be72029114e3cd6301e0aaeef6b557fa033 # v0.0.8
with:
jsonSchemaFile: CHANGELOG/schema.json
yamlFiles: |
CHANGELOG/unreleased/*/*.yaml