Merge 3e29752235f8b1d2f81c78d32aa1dc95611d15a2 into sapling-pr-archiv… #54
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# 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 |