Skip to content

Commit e9899b0

Browse files
authored
Merge pull request #4 from alicefr/add-cs
Build buildroot for centos stream 9
2 parents 43a03ab + 10de919 commit e9899b0

2 files changed

Lines changed: 35 additions & 38 deletions

File tree

.github/workflows/buildroot.yml

Lines changed: 33 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -38,34 +38,27 @@ concurrency:
3838
cancel-in-progress: true
3939

4040
jobs:
41-
build-x86_64:
42-
runs-on: ubuntu-24.04
43-
steps:
44-
- name: Checkout repo
45-
uses: actions/checkout@v5
46-
47-
- name: Build container image
48-
uses: redhat-actions/buildah-build@v2
49-
with:
50-
context: .github
51-
image: ${{ env.NAME }}
52-
tags: latest-x86_64
53-
containerfiles: Containerfile
54-
oci: true
55-
56-
- name: Push to Container Registry
57-
uses: redhat-actions/push-to-registry@v2
58-
id: push
59-
if: (github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main'
60-
with:
61-
registry: ${{ env.REGISTRY }}
62-
username: ${{ github.actor }}
63-
password: ${{ secrets.GITHUB_TOKEN }}
64-
image: ${{ env.NAME }}
65-
tags: latest-x86_64
66-
67-
build-aarch64:
68-
runs-on: ubuntu-24.04-arm
41+
build:
42+
runs-on: ${{ matrix.runner }}
43+
strategy:
44+
matrix:
45+
include:
46+
- tag: fedora
47+
base: quay.io/fedora/fedora:latest
48+
arch: x86_64
49+
runner: ubuntu-24.04
50+
- tag: fedora
51+
base: quay.io/fedora/fedora:latest
52+
arch: aarch64
53+
runner: ubuntu-24.04-arm
54+
- tag: centos-stream
55+
base: quay.io/centos/centos:stream9
56+
arch: x86_64
57+
runner: ubuntu-24.04
58+
- tag: centos-stream
59+
base: quay.io/centos/centos:stream9
60+
arch: aarch64
61+
runner: ubuntu-24.04-arm
6962
steps:
7063
- name: Checkout repo
7164
uses: actions/checkout@v5
@@ -75,9 +68,11 @@ jobs:
7568
with:
7669
context: .github
7770
image: ${{ env.NAME }}
78-
tags: latest-aarch64
71+
tags: ${{ matrix.tag }}-${{ matrix.arch }}
7972
containerfiles: Containerfile
8073
oci: true
74+
build-args: |
75+
BASE=${{ matrix.base }}
8176
8277
- name: Push to Container Registry
8378
uses: redhat-actions/push-to-registry@v2
@@ -88,22 +83,24 @@ jobs:
8883
username: ${{ github.actor }}
8984
password: ${{ secrets.GITHUB_TOKEN }}
9085
image: ${{ env.NAME }}
91-
tags: latest-aarch64
86+
tags: ${{ matrix.tag }}-${{ matrix.arch }}
9287

9388
merge:
9489
runs-on: ubuntu-24.04
9590
needs:
96-
- build-x86_64
97-
- build-aarch64
91+
- build
92+
strategy:
93+
matrix:
94+
tag: [fedora, centos-stream]
9895
steps:
9996
- name: Create multi-arch manifest
10097
if: (github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main'
10198
shell: bash
10299
run: |
103100
set -euxo pipefail
104-
buildah manifest create "${REGISTRY}/${NAME}:latest" \
105-
"${REGISTRY}/${NAME}:latest-x86_64" \
106-
"${REGISTRY}/${NAME}:latest-aarch64"
101+
buildah manifest create "${REGISTRY}/${NAME}:${{ matrix.tag }}" \
102+
"${REGISTRY}/${NAME}:${{ matrix.tag }}-x86_64" \
103+
"${REGISTRY}/${NAME}:${{ matrix.tag }}-aarch64"
107104
108105
- name: Push to Container Registry
109106
uses: redhat-actions/push-to-registry@v2
@@ -114,4 +111,4 @@ jobs:
114111
username: ${{ github.actor }}
115112
password: ${{ secrets.GITHUB_TOKEN }}
116113
image: ${{ env.NAME }}
117-
tags: latest
114+
tags: ${{ matrix.tag }}

Containerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# SPDX-FileCopyrightText: Timothée Ravier <tim@siosm.fr>
22
# SPDX-License-Identifier: CC0-1.0
33

4-
FROM quay.io/fedora/fedora:latest
4+
ARG BASE
5+
FROM $BASE
56

67
RUN dnf install -y \
78
cargo \
@@ -10,7 +11,6 @@ RUN dnf install -y \
1011
git \
1112
golang \
1213
jq \
13-
just \
1414
openssl-devel \
1515
podman \
1616
rustfmt \

0 commit comments

Comments
 (0)