Skip to content

Commit

Permalink
ci: Use release builds for k8s >= v1.31.0 images
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmidyson committed Sep 15, 2024
1 parent 803aaa7 commit 0b399a7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/build-kind-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,15 @@ jobs:
- name: Recreate tool cache directory
run: mkdir -p "${RUNNER_TOOL_CACHE}"
- uses: actions/checkout@v4
if: github.event.inputs.tag < 'v1.31'
with:
persist-credentials: false
ref: ${{ github.event.inputs.tag }}
- name: Install KinD
uses: helm/[email protected]
with:
install_only: true
version: v0.22.0
version: v0.24.0
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
Expand All @@ -57,7 +58,7 @@ jobs:
uses: docker/setup-buildx-action@v3
- name: Build KinD image for ${{ matrix.arch }}
run: |
kind build node-image . --arch ${{ matrix.arch }} --image ghcr.io/${{ github.repository_owner }}/kind-node:${{ github.event.inputs.tag }}-${{ matrix.arch }}
kind build node-image ${{ github.event.inputs.tag < 'v1.31' && '--type source .' || format('--type release {0}', github.event.inputs.tag) }} --arch ${{ matrix.arch }} --image ghcr.io/${{ github.repository_owner }}/kind-node:${{ github.event.inputs.tag }}-${{ matrix.arch }}
- name: Push KinD image
run: |
docker image push ghcr.io/${{ github.repository_owner }}/kind-node:${{ github.event.inputs.tag }}-${{ matrix.arch }}
Expand Down Expand Up @@ -125,7 +126,7 @@ jobs:
needs: [build-and-push-arch-images]

runs-on: ubuntu-22.04

env:
DOCKER_CLI_EXPERIMENTAL: enabled

Expand Down

0 comments on commit 0b399a7

Please sign in to comment.