Skip to content

Commit

Permalink
ci: update actions to avoid node version warnings (#1178)
Browse files Browse the repository at this point in the history
  • Loading branch information
shiftinv authored Mar 29, 2024
1 parent 0068f88 commit 81c4c1f
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 33 deletions.
5 changes: 1 addition & 4 deletions .github/actions/setup-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/create-release-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 }}
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected].0
uses: pre-commit/[email protected].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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -160,7 +160,7 @@ jobs:
GITHUB_STEP_SUMMARY_FOOTER: "</pre></details>\n"

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up environment
id: setup-env
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up environment
id: setup
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:
echo -e "\n</details>\n" >> $GITHUB_STEP_SUMMARY
- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
Expand All @@ -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/
Expand Down Expand Up @@ -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/
Expand All @@ -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
Expand All @@ -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

Expand All @@ -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
Expand All @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/semantic-pr-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

0 comments on commit 81c4c1f

Please sign in to comment.