From 057e397f63fd116201ebd5020c6fd41ff38a7ff9 Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Wed, 25 Jun 2025 07:34:18 -0500 Subject: [PATCH 1/2] Manually update all GitHub actions to their latest versions Dependabot doesn't appear to be submitting PRs to maintain these. However, the Dependabot config appears to be valid. There may be a setting that needs to be adjusted at the org level or at the individual repository level. --- .github/workflows/build-docs.yml | 8 ++++---- .github/workflows/docker-publish-manual.yml | 12 ++++++------ .github/workflows/docker-publish.yml | 12 ++++++------ .github/workflows/python-test.yml | 10 +++++----- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 2d52e12..8f381ee 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -9,10 +9,10 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python 3.12 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.12 @@ -21,13 +21,13 @@ jobs: run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))") - name: Set up poetry - uses: Gr1N/setup-poetry@v8 + uses: Gr1N/setup-poetry@v9 - name: Configure poetry run: poetry config virtualenvs.in-project true - name: Set up cache - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache with: path: .venv diff --git a/.github/workflows/docker-publish-manual.yml b/.github/workflows/docker-publish-manual.yml index 55b2d5c..5a02f48 100644 --- a/.github/workflows/docker-publish-manual.yml +++ b/.github/workflows/docker-publish-manual.yml @@ -17,11 +17,11 @@ jobs: docker: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Docker meta id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: | pythonopenapi/openapi-spec-validator @@ -29,20 +29,20 @@ jobs: type=semver,pattern={{version}},value=${{ github.event.inputs.version }} - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Login to DockerHub if: github.event.inputs.push - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: context: . platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 1e8bf8d..9055b58 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -13,11 +13,11 @@ jobs: docker: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Docker meta id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: | pythonopenapi/openapi-spec-validator @@ -25,20 +25,20 @@ jobs: type=semver,pattern={{version}} - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Login to DockerHub if: github.event_name != 'pull_request' - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: context: . platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/python-test.yml b/.github/workflows/python-test.yml index 57e0b47..2556acb 100644 --- a/.github/workflows/python-test.yml +++ b/.github/workflows/python-test.yml @@ -18,10 +18,10 @@ jobs: os: [windows-latest, ubuntu-latest] fail-fast: false steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} @@ -30,13 +30,13 @@ jobs: run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))") - name: Set up poetry - uses: Gr1N/setup-poetry@v8 + uses: Gr1N/setup-poetry@v9 - name: Configure poetry run: poetry config virtualenvs.in-project true - name: Set up cache - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache with: path: .venv @@ -62,4 +62,4 @@ jobs: run: poetry run deptry . - name: Upload coverage - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v5 From 97e44a91066c573a3e70b22822470a30b2d58293 Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Wed, 25 Jun 2025 07:48:26 -0500 Subject: [PATCH 2/2] Migrate off of `set-output`, which is deprecated This change eliminates warnings in CI caused by the deprecation. In addition, using the `python-version` output of the `setup-python` action fixes a bug that prevented Windows caches from containing the Python version. For reference, Windows caches were created with names that lacked the Python version, like: ``` venv-pull_request-Windows--{hash} ``` --- .github/workflows/build-docs.yml | 7 ++----- .github/workflows/python-test.yml | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 8f381ee..6ff3afe 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -12,14 +12,11 @@ jobs: - uses: actions/checkout@v4 - name: Set up Python 3.12 + id: setup-python uses: actions/setup-python@v5 with: python-version: 3.12 - - name: Get full Python version - id: full-python-version - run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))") - - name: Set up poetry uses: Gr1N/setup-poetry@v9 @@ -31,7 +28,7 @@ jobs: id: cache with: path: .venv - key: venv-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }} + key: venv-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} - name: Ensure cache is healthy if: steps.cache.outputs.cache-hit == 'true' diff --git a/.github/workflows/python-test.yml b/.github/workflows/python-test.yml index 2556acb..f67449c 100644 --- a/.github/workflows/python-test.yml +++ b/.github/workflows/python-test.yml @@ -21,14 +21,11 @@ jobs: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} + id: setup-python uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - - name: Get full Python version - id: full-python-version - run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))") - - name: Set up poetry uses: Gr1N/setup-poetry@v9 @@ -40,7 +37,7 @@ jobs: id: cache with: path: .venv - key: venv-${{ github.event_name }}-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }} + key: venv-${{ github.event_name }}-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} - name: Ensure cache is healthy if: steps.cache.outputs.cache-hit == 'true'