-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (31 loc) · 1021 Bytes
/
data-sync.yaml
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
name: Sync Data
on:
push:
branches: ['main']
paths: ['data/*/records.json']
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Build and Run
env:
BASE_URL: ${{ secrets.BASE_URL }}
WDB_USERNAME: ${{ secrets.WDB_USERNAME }}
WDB_PASSWORD: ${{ secrets.WDB_PASSWORD }}
run: |
echo '### Sync Summary 📋' >> $GITHUB_STEP_SUMMARY
cd ${GITHUB_WORKSPACE}/push
pip install -r requirements.txt
echo "Sync Run Logs" >> $GITHUB_STEP_SUMMARY
echo "```" >> $GITHUB_STEP_SUMMARY
python3 app.py > tmp.txt
cat tmp.txt
cat tmp.txt >> $GITHUB_STEP_SUMMARY
echo "```" >> $GITHUB_STEP_SUMMARY
echo "✅ Sync Run Completed." >> $GITHUB_STEP_SUMMARY