From 295fc28ceb02c78198f7fbe678352503b3259b6b Mon Sep 17 00:00:00 2001 From: Federico Aguzzi <62149513+f-aguzzi@users.noreply.github.com> Date: Mon, 22 Jul 2024 14:33:35 +0200 Subject: [PATCH] chore(ci): set up workflow for requirements auto-update --- .github/update-requirements.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/update-requirements.yml diff --git a/.github/update-requirements.yml b/.github/update-requirements.yml new file mode 100644 index 00000000..31d0abe6 --- /dev/null +++ b/.github/update-requirements.yml @@ -0,0 +1,26 @@ +name: Update requirements +on: + push: + paths: + - 'pyproject.toml' + - '.github/workflows/update-requirements.yml' + +jobs: + update: + name: Update requirements + runs-on: ubuntu-latest + steps: + - name: Install the latest version of rye + uses: eifinger/setup-rye@v3 + - name: Build app + run: rye run update-requirements + commit: + name: Commit changes + run: | + git config --global user.name 'github-actions' + git config --global user.email 'github-actions[bot]@users.noreply.github.com' + git add . + git commit -m "ci: update requirements.txt [skip ci]" + git push + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}