Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Build and Push Image #1398

Build and Push Image

Build and Push Image #1398

name: Build and Push Image
on:
pull_request:
branches:
- main
push:
branches:
- main
schedule:
- cron: "35 */4 * * *"
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_NAME: centos/centos-bootc-dev
jobs:
build-and-push-image:
runs-on: ubuntu-latest
strategy:
matrix:
os: [fedora, centos]
include:
- os: fedora
version: eln
- os: centos
version: stream9
steps:
- name: Install qemu dependency
run: |
sudo apt-get update
sudo apt-get install -y qemu-user-static
- name: Checkout repository
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Login to quay.io
run: buildah login --username ${{ secrets.QUAY_USER }} --password ${{ secrets.QUAY_PASSWORD }} quay.io
if: ${{ github.event_name != 'pull_request' }}
- name: Build
id: build
uses: redhat-actions/buildah-build@7a95fa7ee0f02d552a32753e7414641a04307056 # v2.13
with:
image: quay.io/centos-bootc/${{ matrix.os }}-bootc-dev
tags: ${{ matrix.version }}
containerfiles: ./${{ matrix.version }}-dev/Containerfile
archs: amd64, arm64
context: ${{ matrix.version }}-dev
- name: Push To quay.io
run: buildah manifest push --all ${{ steps.build.outputs.image-with-tag }} docker://${{ steps.build.outputs.image-with-tag }}
if: ${{ github.event_name != 'pull_request' }}