Skip to content

Rebuild & push images #103

Rebuild & push images

Rebuild & push images #103

name: Rebuild & push images
on:
workflow_dispatch:
schedule:
- cron: "0 6 14,28 * *"
push:
branches:
- main
jobs:
build-n-push:
# To not run in forks
if: github.repository_owner == 'packit'
runs-on: ubuntu-latest
strategy:
matrix:
include:
- dockerfile: Containerfile
image: dist2src
steps:
- uses: actions/checkout@v2
- name: Build Image
id: build-image
# https://github.com/marketplace/actions/buildah-build
uses: redhat-actions/buildah-build@v2
with:
dockerfiles: ${{ matrix.dockerfile }}
image: ${{ matrix.image }}
tags: latest prod
oci: true
- name: Push To Quay
# https://github.com/marketplace/actions/push-to-registry
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}
registry: quay.io/packit
username: ${{ secrets.QUAY_IMAGE_BUILDER_USERNAME }}
password: ${{ secrets.QUAY_IMAGE_BUILDER_TOKEN }}