forked from CentOS/centos-bootc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This will be the container image buildroot.
- Loading branch information
Showing
3 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: builder | ||
|
||
on: | ||
push: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository_owner }}/builder | ||
|
||
jobs: | ||
build-image: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Login | ||
run: buildah login --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} ${{ env.REGISTRY }} | ||
- name: Build | ||
uses: redhat-actions/buildah-build@v2 | ||
with: | ||
image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
tags: latest | ||
containerfiles: ./builder/Containerfile | ||
archs: amd64, ppc64le, s390x, arm64 | ||
oci: true | ||
context: builder | ||
- name: Push | ||
run: buildah push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# This image contains the baseline tools to build bootable base images. | ||
FROM quay.io/centos/centos:stream9 | ||
COPY . /src | ||
RUN /src/build.sh && cd / && rm /src -rf | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
set -xeuo pipefail | ||
|
||
pkginstall() { | ||
dnf -y install "$@" | ||
} | ||
|
||
pkginstall dnf-utils | ||
dnf config-manager --set-enabled crb | ||
pkginstall epel-release epel-next-release | ||
# The repo files reference GPG keys | ||
pkginstall distribution-gpg-keys | ||
# rpm-ostree for builds, and need skopeo to do the container backend | ||
pkginstall rpm-ostree skopeo | ||
# For derived container builds | ||
pkginstall buildah | ||
# And a rust toolchain | ||
pkginstall cargo openssl-devel | ||
|
||
# Build tools | ||
pkginstall selinux-policy-targeted osbuild crypto-policies-scripts sudo |