Skip to content

workflows: Build and push to quay #6

workflows: Build and push to quay

workflows: Build and push to quay #6

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 }}