|
1 | | -name: Update Competition Scores |
| 1 | +name: Update match results from PandaScore to Supabase |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | schedule: |
5 | | - - cron: '*/15 * * * *' # Toutes les 15 minutes |
6 | | - workflow_dispatch: |
| 5 | + - cron: '*/15 * * * *' # toutes les 15 minutes |
| 6 | + workflow_dispatch: # permet de lancer manuellement |
7 | 7 |
|
8 | 8 | jobs: |
9 | | - update-scores: |
| 9 | + update_scores: |
10 | 10 | runs-on: ubuntu-latest |
| 11 | + |
| 12 | + env: |
| 13 | + PANDASCORE_TOKEN: ${{ secrets.PANDASCORE_TOKEN }} |
| 14 | + SUPABASE_URL: ${{ secrets.SUPABASE_URL }} |
| 15 | + SUPABASE_API_KEY: ${{ secrets.SUPABASE_API_KEY }} |
| 16 | + |
11 | 17 | steps: |
12 | | - - uses: actions/checkout@v3 |
13 | | - - name: Set up Python |
14 | | - uses: actions/setup-python@v4 |
15 | | - with: |
16 | | - python-version: '3.10' |
17 | | - - name: Install dependencies |
18 | | - run: pip install -r requirements.txt |
19 | | - - name: Run update script |
20 | | - env: |
21 | | - PANDASCORE_TOKEN: ${{ secrets.PANDASCORE_TOKEN }} |
22 | | - DB_HOST: ${{ secrets.DB_HOST }} |
23 | | - DB_USER: ${{ secrets.DB_USER }} |
24 | | - DB_PASS: ${{ secrets.DB_PASS }} |
25 | | - DB_NAME: ${{ secrets.DB_NAME }} |
26 | | - run: python update_scores.py |
27 | | - env: |
28 | | - PANDASCORE_TOKEN: ${{ secrets.PANDASCORE_TOKEN }} |
29 | | - SUPABASE_URL: https://ajtzkuhsnymajitgdlaw.supabase.co |
30 | | - SUPABASE_API_KEY: ${{ secrets.SUPABASE_API_KEY }}; |
| 18 | + - name: Checkout repository |
| 19 | + uses: actions/checkout@v3 |
| 20 | + |
| 21 | + - name: Set up Python |
| 22 | + uses: actions/setup-python@v4 |
| 23 | + with: |
| 24 | + python-version: '3.10' |
| 25 | + |
| 26 | + - name: Install dependencies |
| 27 | + run: pip install -r requirements.txt |
| 28 | + |
| 29 | + - name: Run update script |
| 30 | + run: python update_scores.py |
0 commit comments