File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed
Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Create app project structure from template
2+
3+ on :
4+ push :
5+ paths :
6+ - " add_apps.json"
7+
8+ jobs :
9+ process-apps :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Checkout repository
14+ uses : actions/checkout@v2
15+
16+ - name : Set up Node.js
17+ uses : actions/setup-node@v2
18+ with :
19+ node-version : " 14"
20+
21+ - name : Install jq
22+ run : sudo apt-get install jq
23+
24+ - name : Process add_apps.json
25+ run : |
26+ mkdir -p apps
27+ for row in $(jq -c '.[]' add_apps.json); do
28+ name=$(echo $row | jq -r '.name')
29+ if [ ! -d "apps/$name" ]; then
30+ cp -r template "apps/$name"
31+ echo $row | jq '.' > "apps/$name/variables.json"
32+ sed -i "s/W9_ID/$name/g" "apps/$name/.env"
33+ fi
34+ done
35+
36+ - name : Commit and push changes
37+ uses : stefanzweifel/git-auto-commit-action@v4
38+ with :
39+ commit_message : Create app project structure from template
You can’t perform that action at this time.
0 commit comments