From 2d660703d028def8532fa071ba19fc33ab4e0607 Mon Sep 17 00:00:00 2001 From: Clivern Date: Fri, 7 Jul 2023 19:31:43 +0200 Subject: [PATCH] chore: update workflow --- .github/workflows/update-requirements.yml | 38 +++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/update-requirements.yml diff --git a/.github/workflows/update-requirements.yml b/.github/workflows/update-requirements.yml new file mode 100644 index 00000000..bc2eb0f3 --- /dev/null +++ b/.github/workflows/update-requirements.yml @@ -0,0 +1,38 @@ +name: Update Requirements + +on: + push: + branches: + - main + +jobs: + update-requirements: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Install dependencies + run: | + pip install -r requirements.txt + + - name: Update requirements.freeze.txt + run: | + pip freeze > requirements.freeze.txt + + - name: Commit and push changes + run: | + git config --local user.name "github-actions[bot]" + git config --local user.email "github-actions[bot]@users.noreply.github.com" + git add requirements.freeze.txt + git commit -m "Update requirements.freeze.txt" || echo "No changes to commit" + git push + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +