Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/dependabot-auto-merge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,48 @@ on:
- labeled

jobs:
export-requirements:
# if: github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: setup python
uses: actions/setup-python@v6
with:
python-version-file: "pyproject.toml"

- name: setup poetry
uses: abatilo/actions-poetry@0dd19c9498c3dc8728967849d0d2eae428a8a3d8
with:
poetry-version: 2.1.2

- name: add poetry plugins
run: |
poetry self add "poetry-dynamic-versioning[plugin]"
poetry self add poetry-plugin-export

- name: Export requirements
run: make export-requirements

- name: Commit and push changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add requirements.txt
git diff --staged --quiet || git commit -m "mesh-2092: update requirements.txt"
git push

enable-automerge:
# Only run on Dependabot PRs
needs: export-requirements
if: github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest
permissions:
Expand Down