-
Notifications
You must be signed in to change notification settings - Fork 897
37 lines (34 loc) · 1.39 KB
/
loader-check.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
name: Check for loader changes
"on":
pull_request:
types: [opened, synchronize, reopened, edited]
jobs:
check_changelog_file:
name: Check for loader changes
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Check if the pull request touches the loader
shell: bash --norc --noprofile {0}
env:
BODY: ${{ github.event.pull_request.body }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
# Get the list of modified files in this pull request
files=$(gh pr view $PR_NUMBER --json files --jq '.files.[].path')
# Ignore loader changes if acknowledged
if echo "$BODY" | egrep -qsi "Acknowledge-check:[[:space:]]*loader-change"; then
exit 0
fi
# Check for loader changes
if echo "${files}" | grep -Eq "^src/loader/.+$"; then
echo "Warning The PR does change the loader. Therefore the upgrade to the next TimescaleDB"
echo "version requires a restart of PostgreSQL. Please coordinate the release with the"
echo "cloud team before merging this PostgreSQL."
echo
echo "After the release is corrdinate, add:"
echo "Acknowledge-check: loader-change"
echo "to the PR message to acknowledge this warning"
exit 1
fi