From baae178b0ce6abd9d8dea94025cffba1213b3cde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bult=C3=A9?= Date: Wed, 13 Nov 2024 19:11:35 +0100 Subject: [PATCH] duplicate jobs --- .github/workflows/update-universes.yml | 38 +++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/.github/workflows/update-universes.yml b/.github/workflows/update-universes.yml index 83adf07..d14ad39 100644 --- a/.github/workflows/update-universes.yml +++ b/.github/workflows/update-universes.yml @@ -2,7 +2,7 @@ name: Update universes on: schedule: - - cron: '27 5 * * *' + - cron: '27 7 * * *' # FIXME: remove push: branches: @@ -10,7 +10,7 @@ on: jobs: - run-update: + run-demo-update: runs-on: ubuntu-latest steps: @@ -33,6 +33,36 @@ jobs: run: | python -u feed-universe.py universe-demo.yaml --dry-run 2>&1 | tee logs/run_log_demo.txt + - name: Commit Run Logs + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git add logs/run_log_demo.txt + git commit -m "Update daily run log for demo" + + - name: Push changes + run: | + git push + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + + run-prod-update: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.x' + + - name: Install dependencies + run: | + pip install --upgrade pip + pip install -r requirements.txt + - name: Update prod universe env: DATAGOUV_URL: https://www.data.gouv.fr @@ -44,8 +74,8 @@ jobs: run: | git config --local user.email "action@github.com" git config --local user.name "GitHub Action" - git add logs/ - git commit -m "Update daily run logs" + git add logs/run_log_prod.txt + git commit -m "Update daily run log for prod" - name: Push changes run: |