-
Notifications
You must be signed in to change notification settings - Fork 87
42 lines (40 loc) · 1.51 KB
/
release_notes_updated.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
name: Release notes updated
on:
pull_request:
types: [opened, synchronize]
jobs:
release_notes_updated:
name: Release Notes Updated
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Debug PR type
env:
REF: ${{ github.event.pull_request.head.ref }}
run: |
if [[ $(expr match "$REF" "release_v[0-9.]\+") -gt 0 ]]; then
echo This is a release PR;
elif [[ $(expr match "$REF" "latest-dep-update-[a-zA-Z0-9]*") -gt 0 ]]; then
echo This is a latest dependency update PR;
elif [[ $(expr match "$REF" "min-dep-update-[a-zA-Z0-9]*") -gt 0 ]]; then
echo This is a minimum dependency update PR;
else
echo This is a regular PR;
fi
echo "PR #: ${{ github.event.number }}"
- name: Release notes added
env:
REF: ${{ github.event.pull_request.head.ref }}
run: |
if [[ $(expr match "$REF" "release_v[0-9.]\+") -gt 0 ]]; then
exit 0;
elif [[ $(expr match "$REF" "latest-dep-update-[a-zA-Z0-9]*") -gt 0 ]]; then
exit 0;
elif [[ $(expr match "$REF" "min-dep-update-[a-zA-Z0-9]*") -gt 0 ]]; then
exit 0;
fi
cat docs/source/release_notes.rst | grep ":pr:\`${{ github.event.number }}\`"