From 1ce3af97a5d4d2f49e0bbae6eda11a068ce82fb4 Mon Sep 17 00:00:00 2001 From: rettigl Date: Thu, 26 Oct 2023 00:39:36 +0200 Subject: [PATCH] add cosmetic updates, and try better conditional check --- .github/workflows/update_dependencies.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/update_dependencies.yml b/.github/workflows/update_dependencies.yml index c532675c..cd286cbb 100644 --- a/.github/workflows/update_dependencies.yml +++ b/.github/workflows/update_dependencies.yml @@ -33,21 +33,23 @@ jobs: id: update run: | poetry run poetry self update - UPDATE_OUTPUT=$(poetry run poetry update) - status=$(git status | grep poetry.lock) - echo "status=$status" >> $GITHUB_OUTPUT + exec 5>&1 + UPDATE_OUTPUT=$(poetry run poetry update|tee >(cat - >&5)) echo "UPDATE_OUTPUT<> $GITHUB_OUTPUT echo "$UPDATE_OUTPUT" >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT + STATUS=$(git status | grep poetry.lock) + echo "STATUS=$STATUS" >> $GITHUB_OUTPUT + # create pull request if necessary - name: "Create Pull Request" uses: peter-evans/create-pull-request@v5 - if: ${{ steps.update.outputs.status != '' }} + if: ${{ contains(steps.update.outputs.STATUS, 'poetry.lock') }} with: token: ${{ steps.generate-token.outputs.token }} commit-message: Update dependencies title: "Update dependencies" body: | - - Dependency updates - - ${{ steps.update.outputs.UPDATE_OUTPUT }} + Dependency updates using Poetry: + ${{ steps.update.outputs.UPDATE_OUTPUT }}