Skip to content

Commit

Permalink
add docs/requirements.txt update, and try removing poetry run
Browse files Browse the repository at this point in the history
  • Loading branch information
rettigl committed Oct 26, 2023
1 parent 7b97202 commit 25f16b1
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/update_dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
schedule:
- cron: '0 1 * * 1'
workflow_dispatch:
push:

jobs:
update_dependencies:
Expand Down Expand Up @@ -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<<EOF" >> $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<<EOF" >> $GITHUB_OUTPUT
echo "$STATUS" >> $GITHUB_OUTPUT
Expand All @@ -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
Expand Down

0 comments on commit 25f16b1

Please sign in to comment.