-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (36 loc) · 1.59 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
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
run: |
if [[ $(expr match "${{ github.event.pull_request.head.ref }}" "release_v[0-9.]\+") -gt 0 ]]; then
echo This is a release PR;
elif [[ $(expr match "${{ github.event.pull_request.head.ref }}" "latest-dep-update-[a-zA-Z0-9]*") -gt 0 ]]; then
echo This is a latest dependency update PR;
elif [[ $(expr match "${{ github.event.pull_request.head.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
run: |
if [[ $(expr match "${{ github.event.pull_request.head.ref }}" "release_v[0-9.]\+") -gt 0 ]]; then
exit 0;
elif [[ $(expr match "${{ github.event.pull_request.head.ref }}" "latest-dep-update-[a-zA-Z0-9]*") -gt 0 ]]; then
exit 0;
elif [[ $(expr match "${{ github.event.pull_request.head.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 }}\`"