From 374b19aa92275f2acfaf6c838869cc969d7725cf Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 9 Nov 2023 09:22:49 -0500 Subject: [PATCH] workflows: Build and push to quay --- .github/workflows/build-push-images.yml | 45 +++++++++++++++++++++++++ .github/workflows/docker-image.yml | 18 ---------- eln-dev/Containerfile | 2 +- 3 files changed, 46 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/build-push-images.yml delete mode 100644 .github/workflows/docker-image.yml diff --git a/.github/workflows/build-push-images.yml b/.github/workflows/build-push-images.yml new file mode 100644 index 0000000..0f83d00 --- /dev/null +++ b/.github/workflows/build-push-images.yml @@ -0,0 +1,45 @@ +name: publish-image + +on: + + push: + branches: + - main + + workflow_dispatch: + +env: + NAMESPACE: quay.io/centos-boot + +jobs: + build-and-push-image: + runs-on: ubuntu-latest + + strategy: + matrix: + image: [eln-dev] + + steps: + - name: Install qemu dependency + run: | + sudo apt-get update + sudo apt-get install -y qemu-user-static + + - name: Checkout repository + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + - name: Login to quay.io + run: buildah login --username ${{ secrets.QUAY_USER }} --password ${{ secrets.QUAY_PASSWORD }} quay.io + + - name: Build + uses: redhat-actions/buildah-build@b4dc19b4ba891854660ab1f88a097d45aa158f76 # v2.12 + with: + image: ${{ env.NAMESPACE }}/${{ matrix.image }} + tags: latest + containerfiles: ./${{ matrix.image }}/Containerfile + archs: amd64 + context: ${{ matrix.image }} + + - name: Push To quay.io + #run: buildah manifest push --all ${{ env.NAMESPACE }}/${{ matrix.image }} docker://${{ env.NAMESPACE }}/${{ matrix.image }} + run: buildah push ${{ env.NAMESPACE }}/${{ matrix.image }} docker://${{ env.NAMESPACE }}/${{ matrix.image }} diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml deleted file mode 100644 index d657a63..0000000 --- a/.github/workflows/docker-image.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Docker Image CI - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - name: Build the Docker image - run: docker build . --file Dockerfile --tag my-image-name:$(date +%s) diff --git a/eln-dev/Containerfile b/eln-dev/Containerfile index 8ea5ec1..a4eb060 100644 --- a/eln-dev/Containerfile +++ b/eln-dev/Containerfile @@ -1,4 +1,4 @@ -FROM quay.io/centos-boot/fedora-boot:eln +FROM quay.io/centos-boot/fedora-tier-1:eln # FROM registry.gitlab.com/centos/cloud/sagano/fedora-boot-tier-1:eln COPY *.repo /etc/yum.repos.d/ RUN dnf --disablerepo='*' --enablerepo=copr-coreos-continuous --enablerepo=copr-rhcontainerbot-bootc -y distro-sync && \