-
Notifications
You must be signed in to change notification settings - Fork 4
94 lines (91 loc) · 2.9 KB
/
build-kind.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: build-kind
on:
workflow_dispatch:
inputs:
version:
description: 'Kubernetes version'
default: 'v1.30.0'
required: true
permissions:
contents: read
jobs:
k8s-node-amd64:
runs-on:
group: "Default Larger Runners"
labels: ubuntu-latest-16-cores
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Prepare
id: prep
run: |
VERSION="${{ github.event.inputs.version }}"
if [[ -z "$VERSION" ]]; then
VERSION="v1.27.13"
fi
echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.22.x
- name: Checkout
uses: actions/checkout@v4
with:
repository: kubernetes/kubernetes
ref: ${{ steps.prep.outputs.VERSION }}
path: kubernetes
- name: Build node image
run: |
cd $GITHUB_WORKSPACE/kubernetes
kind build node-image
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: fluxcdbot
password: ${{ secrets.GHCR_TOKEN }}
- name: Push node image
run: |
docker tag kindest/node:latest ghcr.io/fluxcd/kindest/node:${{ steps.prep.outputs.VERSION }}-amd64
docker push ghcr.io/fluxcd/kindest/node:${{ steps.prep.outputs.VERSION }}-amd64
k8s-node-arm64:
# Hosted on Equinix
# Docs: https://github.com/fluxcd/flux2/tree/main/.github/runners
runs-on: [self-hosted, Linux, ARM64, equinix]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Prepare
id: prep
run: |
VERSION="${{ github.event.inputs.version }}"
if [[ -z "$VERSION" ]]; then
VERSION="v1.27.13"
fi
echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.22.x
- name: Checkout
uses: actions/checkout@v4
with:
repository: kubernetes/kubernetes
ref: ${{ steps.prep.outputs.VERSION }}
path: kubernetes
- name: Build node image
run: |
cd $GITHUB_WORKSPACE/kubernetes
kind build node-image
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: fluxcdbot
password: ${{ secrets.GHCR_TOKEN }}
- name: Push node image
run: |
docker tag kindest/node:latest ghcr.io/fluxcd/kindest/node:${{ steps.prep.outputs.VERSION }}-arm64
docker push ghcr.io/fluxcd/kindest/node:${{ steps.prep.outputs.VERSION }}-arm64