Skip to content

Commit

Permalink
Build container images inside CS9 container
Browse files Browse the repository at this point in the history
To mitigate issues around different buildah versions between Fedora/CS9
and Ubuntu, let's build images inside CS9 container.

Signed-off-by: Martin Perina <[email protected]>
  • Loading branch information
mwperina committed Mar 27, 2024
1 parent 697bc57 commit 2903eb3
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions .github/workflows/images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,32 @@ on:
jobs:
build_container:
runs-on: ubuntu-latest
container:
image: quay.io/centos/centos:stream9
steps:
# Specific steps taken from https://developers.redhat.com/blog/2019/08/14/best-practices-for-running-buildah-in-a-container#setup
- name: Install dependencies
run: |
dnf install \
buildah \
fuse-overlayfs \
--exclude container-selinux \
-y
- name: Adjust container storage
run: |
sed -i \
-e 's|^#mount_program|mount_program|g' \
-e '/additionalimage.*/a "/var/lib/shared",' \
/etc/containers/storage.conf
- name: Checkout sources
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Build manifest
run: |
export _BUILDAH_STARTED_IN_USERNS=""
export BUILDAH_ISOLATION=chroot
./build-scripts/build-push-containers.sh ${{ inputs.image }}
- name: Push manifest o quay.io
Expand Down

0 comments on commit 2903eb3

Please sign in to comment.