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