-
Notifications
You must be signed in to change notification settings - Fork 5
45 lines (42 loc) · 1.38 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
name: Changelog
on:
pull_request:
types: [opened, synchronize]
branches: [master]
paths:
- "BlobViaEventGrid/*"
- "DiagnosticData/*"
- "EventHub/*"
- "StorageQueue/*"
jobs:
get-label:
runs-on: ubuntu-latest
name: get label
outputs:
labels: "${{ steps.pr-labels.outputs.labels }}"
steps:
- name: Get PR labels
id: pr-labels
uses: joerick/[email protected]
check-changelog-updates:
if: "${{ needs.get-label.outputs.labels != ' skip-changelog ' }}"
runs-on: ubuntu-latest
needs: get-label
name: Check changelog update
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v41
- name: Check changelog file
run: |
changed_files_string="${{ steps.changed-files.outputs.all_changed_files }}"
read -ra changed_files_array <<< "$changed_files_string"
chmod +x scripts/changelog_check.sh
for changed_file in "${changed_files_array[@]}"; do
if [[ "$changed_file" == "BlobViaEventGrid/"* ]] || [[ "$changed_file" == "DiagnosticData/"* ]] || [[ "$changed_file" == "EventHub/"* ]] || [[ "$changed_file" == "StorageQueue/"* ]]; then
scripts/changelog_check.sh $(echo "$changed_file)" | cut -d "/" -f1)
fi
done