Skip to content

Cron

Cron #1506

Workflow file for this run

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: [18]
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