builder: Also push to quay.io/centos-boot

This commit is contained in:
Colin Walters 2023-11-04 14:41:20 -04:00
parent f4d69e264d
commit 9ff4c9a6cd
1 changed files with 10 additions and 6 deletions

View File

@ -9,29 +9,33 @@ on:
env: env:
REGISTRY: ghcr.io REGISTRY: ghcr.io
QUAY_ORG: centos-boot
jobs: jobs:
build-image: build-image:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: 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 - name: Install qemu dependency
run: | run: |
sudo apt-get update sudo apt-get update
sudo apt-get install -y qemu-user-static sudo apt-get install -y qemu-user-static
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Login - name: Login to ghcr.io
run: buildah login --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} ${{ env.REGISTRY }} 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 - name: Build
uses: redhat-actions/buildah-build@v2 uses: redhat-actions/buildah-build@v2
with: with:
image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} image: ${{ env.IMAGE }}
tags: latest tags: latest
containerfiles: ./builder/Containerfile containerfiles: ./builder/Containerfile
archs: s390x, arm64, amd64, ppc64le archs: s390x, arm64, amd64, ppc64le
oci: true
context: builder context: builder
- name: Push - name: Push to ghcr.io
run: buildah push --all ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} run: buildah manifest push --all ${{ env.IMAGE }} docker://${{ env.IMAGE }}
- name: Push To quay.io
run: buildah manifest push --all ${{ env.IMAGE }} docker://quay.io/${{ env.QUAY_ORG }}/builder