diff options
author | 2022-11-05 15:05:23 -0400 | |
---|---|---|
committer | 2022-11-05 15:05:23 -0400 | |
commit | 483eda384690b5d345ec4be1f2d308c098100732 (patch) | |
tree | 66ad12b71ecc46536483deefd4c9e5a6e1ff7bd7 | |
parent | upgrade actions/checkout to solve deprecation warnings (diff) |
update all gha packages
-rw-r--r-- | .github/workflows/build.yaml | 10 | ||||
-rw-r--r-- | .github/workflows/deploy.yaml | 21 | ||||
-rw-r--r-- | .github/workflows/lint.yaml | 4 | ||||
-rw-r--r-- | .github/workflows/test.yaml | 6 |
4 files changed, 23 insertions, 18 deletions
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 001c81e..fb280c1 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -33,14 +33,14 @@ jobs: echo "version=$version" >> $GITHUB_OUTPUT printf "%s\n" "${version}" - # The current version (v2) of Docker's build-push action uses buildx, + # Both version 2 and 3 of Docker's build-push action uses buildx, # which comes with BuildKit. It has cache features which can speed up # the builds. See https://github.com/docker/build-push-action - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Log in to GitHub Container Registry - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.repository_owner }} @@ -74,7 +74,7 @@ jobs: # If configured by the cache_config step, also cache the layers in # GitHub Actions. - name: Build image for linting and testing - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: context: . file: ./Dockerfile @@ -92,7 +92,7 @@ jobs: # Make the image available as an artifact so other jobs will be able to # download it. - name: Upload image archive as an artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: ${{ env.artifact }} path: ${{ env.artifact }}.tar diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 0c56bbc..167cfa3 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -18,7 +18,7 @@ jobs: steps: - name: Download image artifact - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: ${{ inputs.artifact }} @@ -27,10 +27,10 @@ jobs: run: docker load -i ${{ inputs.artifact }}.tar - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Log in to GitHub Container Registry - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.repository_owner }} @@ -45,7 +45,7 @@ jobs: # Build the final production image and push it to GHCR. # Tag it with both the short commit SHA and 'latest'. - name: Build final image - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: context: . file: ./Dockerfile @@ -60,14 +60,19 @@ jobs: ghcr.io/python-discord/snekbox:${{ inputs.version }} # Deploy to Kubernetes. + - name: Install kubectl + uses: azure/[email protected] + with: + version: "latest" + - name: Authenticate with Kubernetes - uses: azure/k8s-set-context@v1 + uses: azure/k8s-set-context@v3 with: method: kubeconfig kubeconfig: ${{ secrets.KUBECONFIG }} - name: Deploy to Kubernetes - uses: Azure/k8s-deploy@v1 + uses: azure/k8s-deploy@v4 with: manifests: deployment.yaml images: 'ghcr.io/python-discord/snekbox:${{ inputs.version }}' @@ -75,7 +80,7 @@ jobs: # Push the base image to GHCR, with an inline cache manifest. - name: Push base image - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: context: . file: ./Dockerfile @@ -89,7 +94,7 @@ jobs: # Push the venv image to GHCR, with an inline cache manifest. - name: Push venv image - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: context: . file: ./Dockerfile diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index d955325..79856ba 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -15,7 +15,7 @@ jobs: - name: Set up Python id: python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: "3.11" cache: pip @@ -25,7 +25,7 @@ jobs: run: pip install -U -r requirements/lint.pip - name: Pre-commit environment cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ${{ env.PRE_COMMIT_HOME }} key: "precommit-0-${{ runner.os }}-${{ env.PRE_COMMIT_HOME }}-\ diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index a4576ca..c0efbe4 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -47,7 +47,7 @@ jobs: # Upload it so the coverage from all matrix jobs can be combined later. - name: Upload coverage data - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: coverage path: .coverage.* @@ -63,7 +63,7 @@ jobs: uses: actions/checkout@v3 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: "3.11" cache: pip @@ -73,7 +73,7 @@ jobs: run: pip install -U -r requirements/coverage.pip - name: Download coverage data - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: coverage |