Add anon-aadhaar config #57
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
# We need the directory of the ceremony to match the prefix of the ceremony. | |
name: Validate Directory name and prefix | |
on: | |
pull_request: | |
paths: | |
- 'ceremonies/**' | |
jobs: | |
verify: | |
runs-on: ubuntu-latest | |
if: endsWith(github.head_ref, '-ceremony') | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16' | |
- name: Install jq | |
run: sudo apt-get install jq -y | |
- name: Read JSON and get title | |
run: | | |
title=$(jq -r '.title' ./ceremonies/$(echo $GITHUB_HEAD_REF | tr '[:upper:]' '[:lower:]')/p0tionConfig.json) | |
echo "Title: $title" | |
echo "TITLE=$title" >> $GITHUB_ENV | |
- name: Transform and compare | |
run: | | |
prefix=$(echo "${TITLE}" | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | tr -dc '[:alnum:]-\n\r') | |
echo "Converted Prefix: $prefix" | |
DIR_NAME="$(echo $GITHUB_HEAD_REF | tr '[:upper:]' '[:lower:]')" | |
echo "Dir name: $DIR_NAME" | |
if [ "$prefix" != $DIR_NAME ]; then | |
echo "Error: The ceremony artifacts directory name and ceremony prefix do not match!" | |
exit 1 | |
else | |
echo "Directory name and ceremony prefix match." | |
fi |