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
name: Create app project structure from template | |
on: | |
push: | |
branches: | |
- dev | |
paths: | |
- "add_apps.json" | |
jobs: | |
process-apps: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install jq | |
run: sudo apt-get install jq | |
- name: Process add_apps.json | |
run: | | |
for row in $(jq -c '.[]' add_apps.json); do | |
name=$(echo $row | jq -r '.name') | |
if [ ! -d "apps/$name" ]; then | |
cp -r template "apps/$name" | |
echo $row | jq '.' > "apps/$name/variables.json" | |
sed -i "s/^W9_ID=.*/W9_ID=$name/" "apps/$name/.env" | |
fi | |
done | |
- name: Commit and push changes | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: Create app project structure from template |