From fcb537f7447b175e803655b6a19c1e6ed5e0135e Mon Sep 17 00:00:00 2001 From: Luis Arias Date: Wed, 8 May 2024 08:23:04 +0200 Subject: [PATCH] New series workflow to run on Sundays at 4:15 UTC --- .github/workflows/movies.yaml | 2 +- .github/workflows/series.yaml | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/series.yaml diff --git a/.github/workflows/movies.yaml b/.github/workflows/movies.yaml index 9212bbb..6bc01e4 100644 --- a/.github/workflows/movies.yaml +++ b/.github/workflows/movies.yaml @@ -18,7 +18,7 @@ jobs: uses: Gr1N/setup-poetry@v9 with: poetry-version: "1.7.1" - - run: poetry install --no-root + - run: poetry install - run: poetry run python -m observatoire.tmdb.movies env: # Hugging Face credentials diff --git a/.github/workflows/series.yaml b/.github/workflows/series.yaml new file mode 100644 index 0000000..0ffdb66 --- /dev/null +++ b/.github/workflows/series.yaml @@ -0,0 +1,28 @@ +name: Update Movies Dataset + +on: + # Run this workflow on Sundays at 4:15 UTC + schedule: [{ cron: "15 4 * * 0" }] + # Run this workflow when triggered manually in GitHub’s UI. + workflow_dispatch: {} + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.11.4" + - name: Setup Poetry + uses: Gr1N/setup-poetry@v9 + with: + poetry-version: "1.7.1" + - run: poetry install + - run: poetry run python -m observatoire.tmdb.series + env: + # Hugging Face credentials + HF_TOKEN: ${{ secrets.HF_TOKEN }} + # TMDB credentials + TMDB_API_KEY: ${{ secrets.TMDB_API_KEY }} + TMDB_MAX_RETRIES: 500