Update technos_stats.json data 3 times on the same day each week (90min apart) #37
This file contains hidden or 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: Update technos_stats.json data 3 times on the same day each week (90min apart) | |
| on: | |
| schedule: | |
| # Example: Every Monday at 00:00, 01:30, and 03:00 UTC | |
| - cron: '0 0 * * 2' | |
| - cron: '30 1 * * 2' | |
| - cron: '0 3 * * 2' | |
| workflow_dispatch: | |
| jobs: | |
| update_data: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| env: | |
| TOKENS: ${{ secrets.TOKENS }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.head_ref }} | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Install dependencies | |
| run: pip install -r requirements.txt | |
| - name: Run Python script | |
| run: python -c "from query import get_all_senegalese_technos; get_all_senegalese_technos()" | |
| continue-on-error: true | |
| - name: Auto commit changes | |
| uses: stefanzweifel/git-auto-commit-action@v4 | |
| with: | |
| commit_message: "Update technos_stats.json data n° ${{ github.run_number }}" | |
| commit_user_name: "github-actions[bot]" | |
| commit_user_email: "github-actions[bot]@users.noreply.github.com" | |
| file_pattern: '*.json' | |
| push_options: '--force' | |
| skip_fetch: true | |
| branch: ${{ github.head_ref }} |