From a579dd04620b9782411522515e4443e62d3445e6 Mon Sep 17 00:00:00 2001 From: Bartosz Sokorski Date: Thu, 10 Aug 2023 22:04:40 +0200 Subject: [PATCH] Fix license updater workflow (#622) --- .github/workflows/update_licenses.yml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/update_licenses.yml b/.github/workflows/update_licenses.yml index 64fc9f043..8d98d994b 100644 --- a/.github/workflows/update_licenses.yml +++ b/.github/workflows/update_licenses.yml @@ -17,6 +17,23 @@ jobs: with: python-version: "3.10" + - name: Bootstrap poetry + run: | + curl -sSL https://install.python-poetry.org | python - -y + + - name: Update PATH + run: echo "$HOME/.local/bin" >> $GITHUB_PATH + + - name: Configure poetry + run: poetry config virtualenvs.in-project true + + - name: Install dependencies + run: poetry install + + - name: Update licenses list + run: | + poetry run python src/poetry/core/spdx/helpers.py + - name: Generate token id: generate_token uses: tibdex/github-app-token@v1 @@ -24,10 +41,6 @@ jobs: app_id: ${{ secrets.POETRY_TOKEN_APP_ID }} private_key: ${{ secrets.POETRY_TOKEN_APP_KEY }} - - name: Update licenses list - run: | - python src/poetry/core/spdx/helpers.py - - name: Create PR if necessary uses: peter-evans/create-pull-request@v5 with: