Rebuild & push base image #221
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rebuild & push base image | |
on: | |
workflow_dispatch: | |
schedule: | |
# At 00:00 on Tuesday. | |
- cron: "0 0 * * 2" | |
push: | |
branches: | |
- main | |
paths: | |
- containers/Containerfile | |
jobs: | |
build: | |
# To not run in forks | |
if: github.repository_owner == 'packit' | |
name: Build and push image | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- containerfile: containers/Containerfile | |
tags: "fedora latest" | |
archs: "amd64" | |
- containerfile: containers/Containerfile | |
tags: "fedora latest" | |
archs: "arm64" | |
- containerfile: containers/Containerfile | |
tags: "fedora latest" | |
archs: "ppc64le" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install QEMU dependency | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y qemu-user-static | |
- name: Build Image | |
id: build-image | |
uses: redhat-actions/buildah-build@v2 | |
with: | |
containerfiles: ${{ matrix.containerfile }} | |
image: base | |
tags: ${{ matrix.tags }} | |
archs: ${{ matrix.archs }} | |
# Uncomment once we stop using oc cluster up for tests | |
# oci: true | |
- name: Push To Quay | |
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 }} |