From 25f16b17be30181cf5a06b5c262504720186b8d1 Mon Sep 17 00:00:00 2001 From: rettigl Date: Thu, 26 Oct 2023 12:46:23 +0200 Subject: [PATCH] add docs/requirements.txt update, and try removing poetry run --- .github/workflows/update_dependencies.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/update_dependencies.yml b/.github/workflows/update_dependencies.yml index e3b7985a..7b26e136 100644 --- a/.github/workflows/update_dependencies.yml +++ b/.github/workflows/update_dependencies.yml @@ -4,6 +4,7 @@ on: schedule: - cron: '0 1 * * 1' workflow_dispatch: + push: jobs: update_dependencies: @@ -31,13 +32,20 @@ jobs: - name: "Update poetry lock file" id: update run: | - poetry run poetry self update + poetry self update exec 5>&1 - UPDATE_OUTPUT=$(poetry run poetry update|tee >(cat - >&5)) + UPDATE_OUTPUT=$(poetry update|tee >(cat - >&5)) echo "UPDATE_OUTPUT<> $GITHUB_OUTPUT echo "$UPDATE_OUTPUT" >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT + - name: Export requirements.txt + run: | + poetry export --without-hashes --format=requirements.txt -o docs/requirements.txt -E docs -E notebook + + - name: Obtain git status + id: status + run: | STATUS=$(git status|tee >(cat - >&5)) echo "STATUS<> $GITHUB_OUTPUT echo "$STATUS" >> $GITHUB_OUTPUT @@ -46,7 +54,7 @@ jobs: # create pull request if necessary - name: "Create Pull Request" uses: peter-evans/create-pull-request@v5 - if: ${{ contains(steps.update.outputs.STATUS, 'poetry.lock') }} + if: ${{ contains(steps.status.outputs.STATUS, 'poetry.lock') || contains(steps.status.outputs.STATUS, 'requirements.txt')}} with: token: ${{ steps.generate-token.outputs.token }} commit-message: Update dependencies