-
Notifications
You must be signed in to change notification settings - Fork 7
59 lines (51 loc) · 1.49 KB
/
run_data_sync.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Sync Data
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
push:
branches:
- master
paths:
- scripts/gcoresposter/cli.py
- scripts/gen.py
jobs:
sync:
name: Sync
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Configure pip cache
uses: actions/cache@v1
id: pip-cache
with:
path: venv
key: pip-1-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
if: steps.pip-cache.outputs.cache-hit != 'true'
- name: Run sync script
run: |
source venv/bin/activate
python scripts/gen.py
- name: Make svg GitHub profile
run: |
source venv/bin/activate
python scripts/gcoresposter/cli.py --special-likes 500 --special-likes2 1000 --special-color '#0f99a1' --special-color2 '#f44336'
- name: Push new audio
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git commit -a -m 'update new audio' || echo "nothing to commit"
git push || echo "nothing to push"