Skip to content

Commit

Permalink
builder: Also push to quay.io/centos-boot
Browse files Browse the repository at this point in the history
  • Loading branch information
cgwalters committed Nov 4, 2023
1 parent 5684b5c commit e793934
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,34 @@ on:

env:
REGISTRY: ghcr.io
QUAY_ORG: centos-boot

jobs:
build-image:
runs-on: ubuntu-latest

steps:
- run: echo IMAGE_NAME=$(echo ${{ github.repository_owner }}/builder | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
- run: echo IMAGE=${{ env.REGISTRY }}/$(echo ${{ github.repository_owner }}/builder | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
- name: Install qemu dependency
run: |
sudo apt-get update
sudo apt-get install -y qemu-user-static
- name: Checkout repository
uses: actions/checkout@v3
- name: Login
- name: Login to ghcr.io
run: buildah login --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} ${{ env.REGISTRY }}
- 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@v2
with:
image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
image: ${{ env.IMAGE }}
tags: latest
containerfiles: ./builder/Containerfile
archs: s390x, arm64, amd64, ppc64le
oci: true
context: builder
- name: Push
run: buildah push --all ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Push to ghcr.io
run: buildah manifest push ${{ env.IMAGE }} docker://${{ env.IMAGE }}
- name: Push To quay.io
run: buildah manifest push ${{ env.IMAGE }} docker://quay.io/${{ env.QUAY_ORG }}/builder
1 change: 1 addition & 0 deletions builder/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash
set -xeuo pipefail

date > /usr/share/blah
exit 0

pkginstall() {
Expand Down

0 comments on commit e793934

Please sign in to comment.