-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (35 loc) · 965 Bytes
/
update.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
name: Weekly Update
on:
workflow_dispatch:
schedule:
- cron: '0 2 * * 0'
push:
branches: [ main ]
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: checkout actions
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip' # caching pip dependencies
- name: Install dependencies
run: pip install -r requirements.txt
- name: Work
env:
MY_CONFIG_JSON: ${{ secrets.MY_CONFIG_JSON }}
run:
python auto.py prod
- name: commit to this repo
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
git add .
git commit -m 'update new opml' || echo "nothing to commit"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}