-
Notifications
You must be signed in to change notification settings - Fork 9
38 lines (33 loc) · 1.15 KB
/
generate-data-member.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Generate Data Member in Json
on:
push:
branches: [master]
workflow_dispatch:
jobs:
generate_data_member:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Download csv file of member form in gsheet
run: |
curl -L -o ./scripts/dataMember.csv https://docs.google.com/spreadsheets/d/1SaXnuRt-1KXyDGS18KqU7cus4_IWNxpGhiVy0J1vz-U/export?format=csv
- name: run python script to convert csv to json
run: |
cd ./scripts
python script.py
git checkout -b production
cp ./dataMember.json ../data/dataMember.json
cd ..
rm -rf ./scripts
git add ./data/dataMember.json
# Commit the changes
- name: Commit changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git commit -m "Update data member from GitHub Action" || true
# Push the changes back to the repository
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}