Skip to content

Commit 26330c5

Browse files
rucodereriknordmark
authored andcommitted
build: add workflow to bootstrap eve-alpine-base on demand
Add a workflow_dispatch workflow that builds and pushes the eve-alpine-base image for all three platforms (amd64, arm64, riscv64). This is needed because alpine-base is a bootstrap image that is built rarely and manually — it is not part of the regular CI build. The current eve-alpine-base image is missing riscv64, which was lost during the Alpine 3.22 migration. This workflow allows rebuilding it without manual Docker access. Signed-off-by: Mikhail Malyshev <mike.malyshev@gmail.com>
1 parent c0d22e1 commit 26330c5

File tree

2 files changed

+72
-2
lines changed

2 files changed

+72
-2
lines changed
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Copyright (c) 2026, Zededa, Inc.
2+
# SPDX-License-Identifier: Apache-2.0
3+
---
4+
name: Alpine base image - build and publish on demand
5+
on: # yamllint disable-line rule:truthy
6+
workflow_dispatch:
7+
8+
permissions: {}
9+
10+
concurrency:
11+
group: ${{ github.workflow }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
build:
16+
# Only run for the default branch
17+
if: github.ref_name == github.event.repository.default_branch
18+
permissions:
19+
contents: read
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
include:
24+
- arch: amd64
25+
runner: zededa-ubuntu-2204
26+
- arch: arm64
27+
runner: zededa-ubuntu-2204-arm64
28+
- arch: riscv64
29+
runner: zededa-ubuntu-2204
30+
runs-on: ${{ matrix.runner }}
31+
32+
steps:
33+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
34+
with:
35+
fetch-depth: 0
36+
persist-credentials: false
37+
- name: Set up QEMU for cross-arch builds
38+
if: matrix.arch == 'riscv64'
39+
run: |
40+
APT_INSTALL="sudo apt install -y binfmt-support qemu-user-static"
41+
$APT_INSTALL || { sudo apt update && $APT_INSTALL ; }
42+
- name: Login to Docker Hub
43+
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
44+
with:
45+
username: ${{ secrets.RELEASE_DOCKERHUB_ACCOUNT }}
46+
password: ${{ secrets.RELEASE_DOCKERHUB_TOKEN }}
47+
- name: Build and push alpine-base (${{ matrix.arch }})
48+
run: |
49+
make V=1 ZARCH=${{ matrix.arch }} LINUXKIT_PKG_TARGET=push pkg/alpine-base
50+
51+
manifest:
52+
needs: build
53+
if: github.ref_name == github.event.repository.default_branch
54+
runs-on: zededa-ubuntu-2204
55+
permissions:
56+
contents: read
57+
58+
steps:
59+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
60+
with:
61+
fetch-depth: 0
62+
persist-credentials: false
63+
- name: Login to Docker Hub
64+
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
65+
with:
66+
username: ${{ secrets.RELEASE_DOCKERHUB_ACCOUNT }}
67+
password: ${{ secrets.RELEASE_DOCKERHUB_TOKEN }}
68+
- name: Create multi-arch manifest
69+
run: |
70+
make V=1 LINUXKIT_PKG_TARGET=manifest pkg/alpine-base

pkg/alpine/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# DON'T FORGET TO UPDATE THE HASH WHEN SOMETHING CHANGES!
22
# please see https://github.com/lf-edge/eve/blob/master/docs/BUILD.md#how-to-update-eve-alpine-package
3-
FROM lfedge/eve-alpine-base:17217d430af556ba0ddfb6a938c3b3ef93c9b512 AS cache-build
3+
FROM lfedge/eve-alpine-base:77cc1495c875b7468dbf4123210abf86a1ffb852 AS cache-build
44

55
ARG ALPINE_VERSION=3.22
66
# this is only needed once, when this package
@@ -40,7 +40,7 @@ done
4040
RUN cp /mirror/${ALPINE_VERSION}/rootfs/etc/apk/repositories /etc/apk
4141
RUN apk update
4242

43-
FROM lfedge/eve-alpine-base:17217d430af556ba0ddfb6a938c3b3ef93c9b512 AS compactor
43+
FROM lfedge/eve-alpine-base:77cc1495c875b7468dbf4123210abf86a1ffb852 AS compactor
4444
ARG TARGETARCH
4545
ARG GO_VERSION=1.24.6
4646

0 commit comments

Comments
 (0)