From c45c0d642d328e0c32da119cf2ad70abd13d11d8 Mon Sep 17 00:00:00 2001 From: Ryan Foster Date: Tue, 26 Mar 2024 19:21:04 -0400 Subject: [PATCH] Update first-party GitHub Actions Update first-party GitHub Actions to avoid warnings about node12 and node16. * Update actions/checkout from v1 to v4 * Update actions/setup-python from v2/v3 to v5 --- .github/workflows/all-lints.yml | 2 +- README.md | 14 +++++++------- action.yml | 2 +- examples/actions-only_changed_files.yml | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/all-lints.yml b/.github/workflows/all-lints.yml index d86b0bd..8785996 100644 --- a/.github/workflows/all-lints.yml +++ b/.github/workflows/all-lints.yml @@ -11,7 +11,7 @@ jobs: os: [ubuntu-latest, macos-latest, windows-latest] python-version: ['3.7', '3.8', '3.9', '3.10'] steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - uses: marian-code/python-lint-annotate@master with: python-root-list: "./tests/*.py ./tests/subtest/*.py" diff --git a/README.md b/README.md index fc0beb3..6c74656 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Basic: ```yml steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - uses: marian-code/python-lint-annotate@v3 ``` @@ -38,7 +38,7 @@ Options: ```yml steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - uses: marian-code/python-lint-annotate@v3 with: python-root-list: "src/ tests/*" # accepts wildcards @@ -54,7 +54,7 @@ steps: ## Details -Uses `actions/setup-python@v2`. Only python `3.7` - `3.10` version are tested since +Uses `actions/setup-python@v5`. Only python `3.7` - `3.10` version are tested since they are by far most common now. Other python `3.x` versions should also work. Any python `2.x` versions are unsupported! You can lint on Linux, Windows and MacOS. @@ -73,9 +73,9 @@ isort==5.10.1 ## IMPORTANT - test environment -The python version is set by `actions/setup-python@v2` using composite actions. This +The python version is set by `actions/setup-python@v5` using composite actions. This means that the the action will change python you might have previously set with -`actions/setup-python@v2`. There are two ways to circumvent this. +`actions/setup-python@v5`. There are two ways to circumvent this. - Keep the lintnig action separated from others - Use it at the and of your workflow when the change in python version will not @@ -93,8 +93,8 @@ jobs: name: Lint Python runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: 3.9 - run: | diff --git a/action.yml b/action.yml index 5ec2538..74232d0 100644 --- a/action.yml +++ b/action.yml @@ -81,7 +81,7 @@ runs: using: "composite" steps: - name: Setup python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ inputs.python-version }} architecture: x64 diff --git a/examples/actions-only_changed_files.yml b/examples/actions-only_changed_files.yml index 02209e4..3bb23bd 100644 --- a/examples/actions-only_changed_files.yml +++ b/examples/actions-only_changed_files.yml @@ -8,11 +8,11 @@ jobs: name: Lint steps: - name: Check out source repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 # This is necessary to get the commits - name: Set up Python environment - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 with: python-version: "3.8" - name: Get changed python files between base and head