forked from alisw/ali-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (44 loc) · 1.24 KB
/
check-publisher.yml
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
48
49
50
---
# Check commits and incoming PRs that change anything under publish/.
name: Check publisher
'on':
push:
paths:
- 'publish/**'
pull_request:
paths:
- 'publish/**'
types:
- opened
- reopened
- edited
- ready_for_review
- synchronize
permissions: {}
jobs:
rules:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install prerequisites
run: |
sudo apt update -y
# python-ldap needs lib{ldap,sasl}2-dev
sudo apt install -y libldap2-dev libsasl2-dev \
python3-dev python3-pip python3-setuptools python3-wheel
python3 -m pip install -r requirements.txt
- name: Test publishing rules
run: |
cd publish
err=0
for conf in aliPublish*.conf; do
test=test${conf#aliPublish}
test=${test%.conf}.yaml
[ -r "$test" ] || continue
if ! ./aliPublishS3 test-rules --conf "$conf" --test-conf "$test" --debug; then
echo -n "::error file=publish/$conf,line=1,title=Rules validation failed"
echo "::Testing $conf against $test failed."
err=1
fi
done
exit $err