Skip to content

Poetry update

Poetry update #31

Workflow file for this run

name: Poetry update
on:
workflow_dispatch:
schedule:
- cron: '10 2 * * 3'
jobs:
poetry-update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- name: Update setuptools
run: python -m pip install --upgrade pip setuptools
- name: Install poetry dependencies
run: |
poetry install --with dev || poetry install --with dev || echo "No dev dependency group"
- name: Setup git
run: |
git config --global user.name "Poetry updater"
git config --global user.email "actions@users.noreply.github.com"
git config --global url.https://github.com/.insteadOf git://github.com/
- name: Set branch name
run: |
echo "BRANCH_NAME=poetry_update" >> $GITHUB_ENV
echo ${{ env.BRANCH_NAME }}
- name: Switch to branch ${{ env.BRANCH_NAME }}
run: |
git checkout -b ${{ env.BRANCH_NAME }}
- name: Run poetry update
run: |
poetry update
git add .
git commit -m 'update dependencies'
git push --set-upstream origin ${{ env.BRANCH_NAME }}
- name: Create pull request
uses: repo-sync/pull-request@v2
with:
source_branch: "${{ env.BRANCH_NAME }}"
destination_branch: "main"
pr_title: "Poetry update"
github_token: ${{ secrets.GITHUB_TOKEN }}