Trigger token expiration check #709
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: Trigger token expiration check | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '10 11 * * *' | |
jobs: | |
trigger_token_expiration_check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: main | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.9" | |
- name: Install dependencies | |
run: pip install -r requirements.txt | |
- name: Run main script | |
run: python api_token_expiration_check.py main | |
env: | |
HDX_API_TOKEN: ${{ secrets.HDX_MAIN_API_TOKEN }} | |
- name: Run dev script | |
run: python api_token_expiration_check.py dev | |
env: | |
HDX_API_TOKEN: ${{ secrets.HDX_DEV_API_TOKEN }} | |
- uses: stefanzweifel/git-auto-commit-action@v4 | |
name: Commit updated sources | |
with: | |
commit_message: automatic - token expiration check times updated |