From 050a577180951915bea85cb1b89755dfa31dea29 Mon Sep 17 00:00:00 2001 From: Jon Burdo Date: Mon, 16 Mar 2026 18:18:31 -0400 Subject: [PATCH] ci: add workflow to regenerate async-upload requirements.txt for Dependabot PRs Dependabot updates pyproject.toml and poetry.lock but cannot run `poetry export` to regenerate requirements.txt, causing the "Check generated code or files are in sync" check to fail. This adds a workflow that detects Dependabot PRs touching jobs/async-upload/poetry.lock, runs `make install` to regenerate requirements.txt, and commits the result. Co-Authored-By: Claude Opus 4.6 Signed-off-by: Jon Burdo --- .../dependabot-async-upload-regen.yml | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/dependabot-async-upload-regen.yml diff --git a/.github/workflows/dependabot-async-upload-regen.yml b/.github/workflows/dependabot-async-upload-regen.yml new file mode 100644 index 0000000000..c407ef827b --- /dev/null +++ b/.github/workflows/dependabot-async-upload-regen.yml @@ -0,0 +1,40 @@ +name: Regenerate async-upload requirements.txt + +on: + pull_request: + paths: + - "jobs/async-upload/poetry.lock" + +permissions: + contents: write + +jobs: + regenerate: + if: github.actor == 'dependabot[bot]' + runs-on: ubuntu-latest + defaults: + run: + working-directory: jobs/async-upload + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + with: + ref: ${{ github.head_ref }} + token: ${{ secrets.GITHUB_TOKEN }} + + - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6 + with: + python-version: "3.11" + + - name: Install Poetry + run: pipx install poetry + + - name: Regenerate requirements.txt + run: make install + + - name: Commit updated requirements.txt + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add requirements.txt + git diff --cached --quiet || git commit -m "chore: regenerate requirements.txt" + git push