forked from Blankwonder/surge-list
-
Notifications
You must be signed in to change notification settings - Fork 29
69 lines (59 loc) · 1.96 KB
/
cron.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
59
60
61
62
63
64
65
66
67
68
69
name: Cron
on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '0 0 * * *'
jobs:
release:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node-version: [16]
steps:
- name: Fetch repository
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Cache node modules
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-build-${{ env.cache-name }}-
${{ runner.OS }}-build-
${{ runner.OS }}-
- name: yarn install, generate
run: |
yarn install
yarn gen-domain-set
- name: commit, push
uses: EndBug/add-and-commit@v5
with:
add: 'domain-set'
author_name: Roy Li
author_email: me@dada.li
message: 'auto update'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Prepare files
run: |
mkdir -p ./rule-set
cp ./*.list ./rule-set/
- name: Upload files P1
uses: geekdada/ossutil-github-action@master
with:
ossArgs: 'sync --delete -u -f ./domain-set oss://dada-oss/github/surge-list/domain-set'
accessKey: ${{ secrets.ALIYUN_ACCESS_KEY }}
accessSecret: ${{ secrets.ALIYUN_ACCESS_SECRET }}
endpoint: oss-accelerate.aliyuncs.com
- name: Upload files P2
uses: geekdada/ossutil-github-action@master
with:
ossArgs: 'sync --delete -u -f ./rule-set oss://dada-oss/github/surge-list/rule-set'
accessKey: ${{ secrets.ALIYUN_ACCESS_KEY }}
accessSecret: ${{ secrets.ALIYUN_ACCESS_SECRET }}
endpoint: oss-accelerate.aliyuncs.com