Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish Kubernetes KinD node images for AMD64/ARM64 #7

Merged
merged 2 commits into from
Apr 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 94 additions & 0 deletions .github/workflows/build-kind.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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
Loading