Files
ucas-covid19/.github/workflows/report.yml
2020-04-08 13:48:42 +08:00

37 lines
1.2 KiB
YAML

# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
schedule:
- cron: '0 0 * * *'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Set up Python 3.6
uses: actions/setup-python@v1
with:
python-version: 3.6
# Runs a set of commands using the runners shell
- name: Run a multi-line script
run: |
python -m pip install --upgrade pip
python -m pip install pytz requests datetime
sed -i "s/PASSWORD/${{ secrets.SEP_PASSWD }}/g" sub.py
sed -i "s/USERNAME/${{ secrets.SEP_USER_NAME }}/g" sub.py
sed -i "s/API_KEY/${{ secrets.API_KEY }}/g" sub.py
python ./sub.py >> /dev/null