Skip to content

Commit 504fc47

Browse files
committed
Build KinD node image for AMD64
Runs on GitHub ubuntu-latest-16-cores Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
1 parent b368bb1 commit 504fc47

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.github/workflows/build-kind.yaml

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: build-kind
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'Kubernetes version'
8+
default: 'v1.30.0'
9+
required: true
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
k8s-node-amd64:
16+
runs-on:
17+
group: "Default Larger Runners"
18+
labels: ubuntu-latest-16-cores
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
- name: Prepare
23+
id: prep
24+
run: |
25+
VERSION="${{ github.event.inputs.version }}"
26+
if [[ -z "$VERSION" ]]; then
27+
VERSION="v1.27.13"
28+
fi
29+
echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
30+
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
31+
- name: Setup Go
32+
uses: actions/setup-go@v5
33+
with:
34+
go-version: 1.22.x
35+
- name: Checkout
36+
uses: actions/checkout@v4
37+
with:
38+
repository: kubernetes/kubernetes
39+
ref: ${{ steps.prep.outputs.VERSION }}
40+
path: kubernetes
41+
- name: Build node image
42+
run: |
43+
cd $GITHUB_WORKSPACE/kubernetes
44+
kind build node-image
45+
- name: Login to GitHub Container Registry
46+
uses: docker/login-action@v3
47+
with:
48+
registry: ghcr.io
49+
username: fluxcdbot
50+
password: ${{ secrets.GHCR_TOKEN }}
51+
- name: Push node image
52+
run: |
53+
docker tag kindest/node:latest ghcr.io/fluxcd/kindest/node:${{ steps.prep.outputs.VERSION }}-amd64
54+
docker push ghcr.io/fluxcd/kindest/node:${{ steps.prep.outputs.VERSION }}-amd64

0 commit comments

Comments
 (0)