diff --git a/.github/workflows/build_container_images.yml b/.github/workflows/build_container_images.yml index 1fca037..df35196 100644 --- a/.github/workflows/build_container_images.yml +++ b/.github/workflows/build_container_images.yml @@ -20,14 +20,23 @@ jobs: matrix: image: - "skopeo_cidev" + - "podman_cidev" + include: + - image: skopeo_cidev + context: container-images/skopeo_cidev + file: container-images/skopeo_cidev/Containerfile + - image: podman_cidev + context: . + file: container-images/podman_cidev/Containerfile env: IMAGE: ghcr.io/${{ github.repository_owner }}/${{ matrix.image }}:${{ inputs.tag }} - CONTEXT: container-images/${{ matrix.image }} + CONTEXT: ${{ matrix.context }} + CONTAINERFILE: ${{ matrix.file }} steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Build image - run: podman build -t "$IMAGE" "$CONTEXT" + run: podman build -t "$IMAGE" -f "$CONTAINERFILE" "$CONTEXT" - name: Log in to ghcr.io if: ${{ inputs.push }} diff --git a/container-images/podman_cidev/Containerfile b/container-images/podman_cidev/Containerfile new file mode 100644 index 0000000..1cf4d4f --- /dev/null +++ b/container-images/podman_cidev/Containerfile @@ -0,0 +1,13 @@ +ARG BASE_NAME=fedora +ARG BASE_TAG=latest +ARG BUILD_NAME=fedora-current +FROM ${BASE_NAME}:${BASE_TAG} +ARG BUILD_NAME + +# Required to keep perl & other tooling happy +ENV LC_ALL="C" + +COPY images/fedora_packaging.sh /root/fedora_packaging.sh +RUN CONTAINER=1 bash /root/fedora_packaging.sh "${BUILD_NAME}" && \ + dnf clean all && \ + rm /root/fedora_packaging.sh diff --git a/container-images/podman_cidev/README.md b/container-images/podman_cidev/README.md new file mode 100644 index 0000000..a1f4edd --- /dev/null +++ b/container-images/podman_cidev/README.md @@ -0,0 +1,8 @@ +# Podman CI/Dev image + +Built and pushed to `ghcr.io/podman-container-tools/podman_cidev:` by +`.github/workflows/build_container_images.yml` on every release tag. + +Used by the [podman](https://github.com/containers/podman) and +[buildah](https://github.com/containers/buildah) projects for container-based +CI. Not intended for use outside those contexts. diff --git a/images/fedora_packaging.sh b/images/fedora_packaging.sh index 05f15fe..0155a06 100644 --- a/images/fedora_packaging.sh +++ b/images/fedora_packaging.sh @@ -209,11 +209,13 @@ dnf install -y "${INSTALL_PACKAGES[@]}" # This may be due to activation of suggested/recommended dependency resolution. dnf update -y -# Make /tmp tmpfs bigger, by default we only get 50%. Bump it to 75% so the tests have more storage. -# Do not use 100% so we do not run out of memory for the process itself if tests start leaking big -# files on /tmp. -mkdir -p /etc/systemd/system/tmp.mount.d -echo -e "[Mount]\nOptions=size=75%%,mode=1777\n" | $SUDO tee /etc/systemd/system/tmp.mount.d/override.conf - -# "Enabling cgroup management from containers" -setsebool -P container_manage_cgroup true +if ! ((CONTAINER)); then + # Make /tmp tmpfs bigger, by default we only get 50%. Bump it to 75% so the tests have more storage. + # Do not use 100% so we do not run out of memory for the process itself if tests start leaking big + # files on /tmp. + mkdir -p /etc/systemd/system/tmp.mount.d + echo -e "[Mount]\nOptions=size=75%%,mode=1777\n" | $SUDO tee /etc/systemd/system/tmp.mount.d/override.conf + + # "Enabling cgroup management from containers" + setsebool -P container_manage_cgroup true +fi