From 81c4c1fadf8cc466b950d513765ac1cf185fb346 Mon Sep 17 00:00:00 2001 From: shiftinv <8530778+shiftinv@users.noreply.github.com> Date: Fri, 29 Mar 2024 12:50:23 +0100 Subject: [PATCH] ci: update actions to avoid node version warnings (#1178) --- .github/actions/setup-env/action.yml | 5 +---- .github/workflows/changelog.yaml | 2 +- .github/workflows/create-release-pr.yaml | 10 +++++----- .github/workflows/lint-test.yml | 20 ++++++++++---------- .github/workflows/release.yaml | 24 ++++++++++++------------ .github/workflows/semantic-pr-title.yml | 2 +- 6 files changed, 30 insertions(+), 33 deletions(-) diff --git a/.github/actions/setup-env/action.yml b/.github/actions/setup-env/action.yml index 89578a885f..a7255e67af 100644 --- a/.github/actions/setup-env/action.yml +++ b/.github/actions/setup-env/action.yml @@ -22,16 +22,13 @@ runs: steps: - name: Set up pdm with python ${{ inputs.python-version }} id: setup-python - uses: pdm-project/setup-pdm@v3 + uses: pdm-project/setup-pdm@v4 with: python-version: ${{ inputs.python-version }} version: "2.4.6" cache: false cache-dependency-path: ${{ inputs.cache-dependency-path }} enable-pep582: false # Disable PEP 582 package loading globally - env: - # temporary fix, see https://github.com/pdm-project/pdm/issues/1894#issuecomment-1537126396 - PDM_DEPS: 'urllib3<2' - name: Disable PDM version check shell: bash diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml index f2a989c0c4..f3bc2e659b 100644 --- a/.github/workflows/changelog.yaml +++ b/.github/workflows/changelog.yaml @@ -22,7 +22,7 @@ jobs: if: contains(github.event.pull_request.labels.*.name, 'skip news') != true steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: # towncrier needs a non-shallow clone fetch-depth: '0' diff --git a/.github/workflows/create-release-pr.yaml b/.github/workflows/create-release-pr.yaml index 96288914d7..7320774787 100644 --- a/.github/workflows/create-release-pr.yaml +++ b/.github/workflows/create-release-pr.yaml @@ -24,12 +24,12 @@ jobs: # https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/making-authenticated-api-requests-with-a-github-app-in-a-github-actions-workflow - name: Generate app token id: generate_token - uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92 # v1.8.0 + uses: actions/create-github-app-token@f2acddfb5195534d487896a656232b016a682f3c # v1.9.0 with: - app_id: ${{ secrets.BOT_APP_ID }} - private_key: ${{ secrets.BOT_PRIVATE_KEY }} + app-id: ${{ secrets.BOT_APP_ID }} + private-key: ${{ secrets.BOT_PRIVATE_KEY }} - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: token: ${{ steps.generate_token.outputs.token }} persist-credentials: false @@ -61,7 +61,7 @@ jobs: git commit -a -m "docs: build changelog" - name: Create pull request - uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v5.0.2 + uses: peter-evans/create-pull-request@70a41aba780001da0a30141984ae2a0c95d8704e # v6.0.2 with: token: ${{ steps.generate_token.outputs.token }} branch: auto/release-v${{ inputs.version }} diff --git a/.github/workflows/lint-test.yml b/.github/workflows/lint-test.yml index f78b75ffff..f252b4d8b2 100644 --- a/.github/workflows/lint-test.yml +++ b/.github/workflows/lint-test.yml @@ -29,18 +29,18 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Run pre-commit id: pre-commit - uses: pre-commit/action@v3.0.0 + uses: pre-commit/action@v3.0.1 docs: # unlike the other workflows, we are using version 20.04 here as # readthedocs uses 20.04 for building our docs, and we want to be explicit runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up environment uses: ./.github/actions/setup-env @@ -60,7 +60,7 @@ jobs: continue-on-error: ${{ matrix.experimental }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up environment id: setup-env @@ -83,29 +83,29 @@ jobs: echo "PYRIGHT_VERSION=$PYRIGHT_VERSION" >> $GITHUB_ENV - name: Run pyright (Linux) - uses: jakebailey/pyright-action@v1.4.1 + uses: jakebailey/pyright-action@v2.2.1 id: pyright-linux with: version: ${{ env.PYRIGHT_VERSION }} python-version: ${{ steps.setup-env.outputs.python-version }} python-platform: "Linux" - no-comments: ${{ matrix.python-version != '3.8' }} # only add comments for one version + annotate: ${{ matrix.python-version == '3.8' }} # only add comments for one version warnings: true - name: Run pyright (Windows) - uses: jakebailey/pyright-action@v1.4.1 + uses: jakebailey/pyright-action@v2.2.1 if: always() && (steps.pyright-linux.outcome == 'success' || steps.pyright-linux.outcome == 'failure') with: version: ${{ env.PYRIGHT_VERSION }} python-version: ${{ steps.setup-env.outputs.python-version }} python-platform: "Windows" - no-comments: true # only add comments for one platform (see above) + annotate: false # only add comments for one platform (see above) warnings: true misc: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up environment id: setup @@ -160,7 +160,7 @@ jobs: GITHUB_STEP_SUMMARY_FOOTER: "\n" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up environment id: setup-env diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 7a713adad5..480b6cc996 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up environment id: setup @@ -46,7 +46,7 @@ jobs: echo -e "\n\n" >> $GITHUB_STEP_SUMMARY - name: Upload artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: dist path: dist/ @@ -66,7 +66,7 @@ jobs: steps: - name: Download build artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: dist path: dist/ @@ -108,7 +108,7 @@ jobs: steps: - name: Download build artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: dist path: dist/ @@ -122,7 +122,7 @@ jobs: echo "docs_version=${GIT_TAG//./-}" >> $GITHUB_OUTPUT - name: Create Release - uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15 + uses: softprops/action-gh-release@9d7c94cfd0a1f3ed45544c887983e9fa900f0564 # v2.0.4 with: files: dist/* draft: true @@ -148,13 +148,13 @@ jobs: steps: - name: Download build artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: dist path: dist/ - name: Upload to pypi - uses: pypa/gh-action-pypi-publish@f5622bde02b04381239da3573277701ceca8f6a0 # v1.8.7 + uses: pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450 # v1.8.14 with: print-hash: true @@ -173,12 +173,12 @@ jobs: # https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/making-authenticated-api-requests-with-a-github-app-in-a-github-actions-workflow - name: Generate app token id: generate_token - uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92 # v1.8.0 + uses: actions/create-github-app-token@f2acddfb5195534d487896a656232b016a682f3c # v1.9.0 with: - app_id: ${{ secrets.BOT_APP_ID }} - private_key: ${{ secrets.BOT_PRIVATE_KEY }} + app-id: ${{ secrets.BOT_APP_ID }} + private-key: ${{ secrets.BOT_PRIVATE_KEY }} - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: token: ${{ steps.generate_token.outputs.token }} persist-credentials: false @@ -200,7 +200,7 @@ jobs: echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT - name: Create pull request - uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v5.0.2 + uses: peter-evans/create-pull-request@70a41aba780001da0a30141984ae2a0c95d8704e # v6.0.2 with: token: ${{ steps.generate_token.outputs.token }} branch: auto/dev-v${{ steps.update-version.outputs.new_version }} diff --git a/.github/workflows/semantic-pr-title.yml b/.github/workflows/semantic-pr-title.yml index 5545181735..72db88061e 100644 --- a/.github/workflows/semantic-pr-title.yml +++ b/.github/workflows/semantic-pr-title.yml @@ -18,6 +18,6 @@ jobs: name: Validate PR Title runs-on: ubuntu-latest steps: - - uses: amannn/action-semantic-pull-request@c3cd5d1ea3580753008872425915e343e351ab54 # v5.2.0 + - uses: amannn/action-semantic-pull-request@e9fabac35e210fea40ca5b14c0da95a099eff26f # v5.4.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}