From c627502126aa583d76248043496cf947237f02d7 Mon Sep 17 00:00:00 2001 From: Thomas Sundvoll Date: Tue, 9 Apr 2024 21:28:15 +0200 Subject: [PATCH] Add automated dependency update workflow --- .github/workflows/compile_requirements.yml | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/compile_requirements.yml diff --git a/.github/workflows/compile_requirements.yml b/.github/workflows/compile_requirements.yml new file mode 100644 index 00000000..7226e106 --- /dev/null +++ b/.github/workflows/compile_requirements.yml @@ -0,0 +1,45 @@ +name: Compile Requirements + +on: + push: + branches: + - main + +jobs: + compile-requirements: + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: "3.12" + + - name: Install pip-tools + run: | + python -m pip install --upgrade pip + pip install pip-tools + + - name: Upgrade dependencies and compile requirements file + run: | + pip-compile --output-file=requirements.txt pyproject.toml --upgrade + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v6 + with: + commit-message: "GHA: Update dependencies" + title: Update dependencies + body: | + - Dependency updates + + Auto-generated by [create-pull-request][1] + + [1]: https://github.com/peter-evans/create-pull-request + branch: update-dependencies + labels: automated-pr + delete-branch: true