Airport Checkin #23
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Airport Checkin" | |
on: | |
schedule: | |
- cron: "0 22 * * *" # scheduled at 06:00 (UTC+8) everyday | |
workflow_dispatch: | |
env: | |
RUN_ENV: 'prod' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
# if: github.ref == 'refs/heads/master' | |
steps: | |
- name: Checkout master | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
# ref: master | |
- name: Set up python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.7 | |
- name: Random sleep | |
if: github.event_name == 'schedule' | |
run: sleep $(shuf -i 10-100 -n 1) | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Run sign | |
env: | |
SCKEY: ${{ secrets.SCKEY }} | |
EMAIL: ${{ secrets.EMAIL }} | |
PASSWD: ${{ secrets.PASSWD }} | |
run: | | |
python3 ./main.py |