Skip to content

Commit

Permalink
Fix k3d version matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
pvannierop committed Jan 22, 2025
1 parent 681458d commit 6756f35
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 8 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/matrix_includes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[
{
"KUBECTL_VERSION": "v1.30.0",
"K3S_VERSION": "v1.30.6+k3s1",
"runOnBranch": "main"
},
{
"KUBECTL_VERSION": "v1.31.0",
"K3S_VERSION": "v1.31.2+k3s1",
"runOnBranch": "always"
}
]
21 changes: 13 additions & 8 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,18 +73,23 @@ jobs:
run: |
k3d cluster delete --all || true
matrix-prep:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: nelonoel/[email protected]
- id: set-matrix
uses: JoshuaTheMiller/conditional-build-matrix@main
with:
# inputFile: .github/workflows/matrix_includes.json
filter: '[?runOnBranch==`${{ env.BRANCH_NAME }}` || runOnBranch==`always`]'

test-k8s-versions:
needs: delete-old-clusters
runs-on: self-hosted
strategy:
matrix:
KUBECTL_VERSION: [ "v1.30.0", "v1.31.0" ]
include:
- KUBECTL_VERSION: "v1.31.0"
K3S_VERSION: "v1.31.2+k3s1"
exclude:
- KUBECTL_VERSION: ${{ github.base_ref != 'refs/heads/main' && 'v1.30.0' }}
K3S_VERSION: ${{ github.base_ref != 'refs/heads/main' && 'v1.30.6+k3s1' }}
matrix: ${{ fromJson(needs.matrix_prep.outputs.matrix) }}
steps:
- uses: nolar/setup-k3d-k3s@v1
with:
Expand Down

0 comments on commit 6756f35

Please sign in to comment.