diff --git a/.github/workflows/fedora-pr.yaml b/.github/workflows/fedora-pr.yaml new file mode 100644 index 00000000..b833f36e --- /dev/null +++ b/.github/workflows/fedora-pr.yaml @@ -0,0 +1,43 @@ +name: "fedora: Build toolbx images for PRs" + +permissions: read-all + +on: + pull_request: + branches: + - main + paths: + - fedora/** + - .github/workflows/fedora-pr.yaml + +env: + distro: 'fedora' + distro_pretty: 'fedora' + latest_release: 'f38' + +jobs: + build-images: + strategy: + matrix: + release: ['f37', 'f38', 'f39'] + + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Build ${{ env.distro_pretty }} ${{ matrix.release }} toolbox image + uses: docker/build-push-action@v3 + with: + context: ${{ env.distro }}/${{ matrix.release }} + file: ${{ env.distro }}/${{ matrix.release }}/Containerfile + platforms: linux/amd64,linux/arm64 + push: false + no-cache: true + tags: quay.io/toolbx-images/${{ env.distro }}-toolbox:${{ matrix.release }} diff --git a/.github/workflows/fedora.yaml b/.github/workflows/fedora.yaml new file mode 100644 index 00000000..60da654b --- /dev/null +++ b/.github/workflows/fedora.yaml @@ -0,0 +1,65 @@ +name: "fedora: Build and push toolbx images" + +permissions: read-all + +on: + push: + branches: + - main + paths: + - fedora/** + - .github/workflows/fedora.yaml + schedule: + - cron: '0 0 * * MON' + +# Prevent multiple workflow runs from racing +concurrency: ${{ github.workflow }} + +env: + distro: 'fedora' + distro_pretty: 'fedora' + latest_release: 'f38' + +jobs: + build-and-push-images: + strategy: + matrix: + release: ['f37', 'f38', 'f39'] + + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Login to Quay.io + uses: docker/login-action@v2 + with: + registry: quay.io + username: 'toolbx-images+github' + password: ${{ secrets.QUAY_ROBOT_TOKEN }} + + - name: Build and push ${{ env.distro_pretty }} ${{ matrix.release }} toolbox image + uses: docker/build-push-action@v3 + with: + context: ${{ env.distro }}/${{ matrix.release }} + file: ${{ env.distro }}/${{ matrix.release }}/Containerfile + platforms: linux/amd64,linux/arm64 + push: true + no-cache: true + tags: quay.io/toolbx-images/${{ env.distro }}-toolbox:${{ matrix.release }} + + - name: Push latest tag + if: env.latest_release == matrix.release + uses: docker/build-push-action@v3 + with: + context: ${{ env.distro }}/${{ matrix.release }} + file: ${{ env.distro }}/${{ matrix.release }}/Containerfile + platforms: linux/amd64,linux/arm64 + push: true + tags: quay.io/toolbx-images/${{ env.distro }}-toolbox:latest diff --git a/fedora/f37/Containerfile b/fedora/f37/Containerfile new file mode 100644 index 00000000..c1fede69 --- /dev/null +++ b/fedora/f37/Containerfile @@ -0,0 +1,37 @@ +FROM registry.fedoraproject.org/fedora:37 + +ARG NAME=fedora-toolbox +ARG VERSION=37 +LABEL com.github.containers.toolbox="true" \ + com.redhat.component="$NAME" \ + name="$NAME" \ + version="$VERSION" \ + usage="This image is meant to be used with the toolbox command" \ + summary="Base image for creating Fedora toolbox containers" \ + maintainer="Debarshi Ray " + +RUN rm /etc/rpm/macros.image-language-conf +RUN sed -i '/tsflags=nodocs/d' /etc/dnf/dnf.conf + +COPY missing-docs extra-packages ensure-files / + +RUN dnf -y upgrade && \ + dnf -y swap coreutils-single coreutils-full && \ + dnf -y swap glibc-minimal-langpack glibc-all-langpacks && \ + dnf -y reinstall $(/dev/null; then \ + echo "$file: No such file or directory" >&2; \ + ret_val=1; \ + break; \ + fi; \ + done /dev/null; then \ + echo "$file: No such file or directory" >&2; \ + ret_val=1; \ + break; \ + fi; \ + done /dev/null; then \ + echo "$file: No such file or directory" >&2; \ + ret_val=1; \ + break; \ + fi; \ + done