Query and Mark On-Leave #1459
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: Query and Mark On-Leave | |
on: | |
schedule: | |
# run every 2 hours | |
- cron: "0 */2 * * *" | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Query and Makr On-Leave | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: '3.8.14' | |
- name: 💾 Restore cache | |
uses: actions/cache@v3 | |
with: | |
path: data.cache | |
key: instance-list-${{ runner.os }}-${{ github.run_id }} | |
restore-keys: | | |
instance-list-${{ runner.os }} | |
- name: Fetch approval list and mark | |
id: run | |
run: | | |
pip install -r requirements.txt | |
python main.py --app-id $APP_ID --app-secret $APP_SECRET --approval-code $APPROVAL_CODE --hours $HOURS | |
env: | |
APP_ID: ${{ secrets.APP_ID }} | |
APP_SECRET: ${{ secrets.APP_SECRET }} | |
APPROVAL_CODE: ${{ secrets.APPROVAL_CODE }} | |
HOURS: ${{ secrets.HOURS }} | |