ZKEmail Ether Email Auth v1 ceremony #67
Workflow file for this run
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 that a PR modified the correct files and nothing more | |
name: Check PR Files | |
on: | |
pull_request: | |
paths: | |
- 'ceremonies/**' | |
jobs: | |
check-files: | |
runs-on: ubuntu-latest | |
if: endsWith(github.head_ref, '-ceremony') | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Get changed files | |
id: get-changed-files | |
uses: jitterbit/get-changed-files@v1 | |
with: | |
format: 'csv' | |
- name: Validate files | |
run: | | |
changed_files="${{ steps.get-changed-files.outputs.all }}" | |
IFS=', ' read -r -a files <<< "$changed_files" | |
config_found=false | |
for file in "${files[@]}"; do | |
if [[ $file == ceremonies/$(echo $GITHUB_HEAD_REF | tr '[:upper:]' '[:lower:]')/p0tionConfig.json ]]; then | |
config_found=true | |
else | |
echo "Invalid file detected: $file" | |
exit 1 | |
fi | |
done | |
if [[ $config_found = false ]]; then | |
echo "No p0tionConfig.json file found in PR." | |
exit 1 | |
fi | |
echo "p0tionConfig.json file is present and no other files were changed." |