Skip to content

build(deps): bump actions/checkout from 4.1.2 to 4.1.6 #69

build(deps): bump actions/checkout from 4.1.2 to 4.1.6

build(deps): bump actions/checkout from 4.1.2 to 4.1.6 #69

Workflow file for this run

name: K3d
on:
pull_request:
paths:
- .github/workflows/k3d.yml
- bin/just-k3d
- Dockerfile
- justfile
- k3d-images.json
permissions:
contents: read
jobs:
sync-k3s-images:
runs-on: ubuntu-latest
timeout-minutes: 10
# When a new K3s version is released, this job will fail. This is expected.
continue-on-error: true
steps:
- run: sudo apt-get update && sudo apt-get install -y skopeo
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
- uses: ./actions/setup-tools
- run: just sync-k3s-images
- run: git diff --exit-code
k3s-matrix:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- run: sudo apt-get update && sudo apt-get install -y jq
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
- name: Load k3s-images.json
id: matrix
run: |
(
echo channel="$(jq -c '.channels | keys' k3s-images.json)"
echo include="$(jq -c '[.digests as $digests | (.channels | to_entries[] | {channel:.key, tag:.value, digest:$digests[.value]})]' k3s-images.json)"
) >> "$GITHUB_OUTPUT"
outputs:
channel: ${{ steps.matrix.outputs.channel }}
include: ${{ steps.matrix.outputs.include }}
k3d-create:
needs: k3s-matrix
runs-on: ubuntu-latest
strategy:
matrix:
channel: ${{ fromJson(needs.k3s-matrix.outputs.channel) }}
include: ${{ fromJson(needs.k3s-matrix.outputs.include) }}
timeout-minutes: 10
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
- uses: ./actions/setup-tools
- run: bin/just-k3d K3S_IMAGES_JSON=k3s-images.json K3S_CHANNEL='${{ matrix.channel }}' create use
- name: Check that server tag is ${{ matrix.tag }}
run: |
tag=$(kubectl version --output=json | jq -r '.serverVersion.gitVersion | sub("\\+"; "-")')
if [ "$tag" != '${{ matrix.tag }}' ] ; then
echo "Running k3d channel=${{ matrix.channel }} expected tag '${{ matrix.tag }}' but found '$tag'" >&2
exit 1
fi