Build and push images to Quay.io registry #239
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: Build and push images to Quay.io registry | |
on: | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: '0 1 * * 3' | |
jobs: | |
build-and-push: | |
if: github.repository_owner == 'sclorg' | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- dockerfile: "13/Dockerfile.c9s" | |
registry_namespace: "sclorg" | |
tag: "c9s" | |
image_name: "postgresql-13-c9s" | |
quayio_username: "QUAY_IMAGE_SCLORG_BUILDER_USERNAME" | |
quayio_token: "QUAY_IMAGE_SCLORG_BUILDER_TOKEN" | |
docker_context: 13 | |
- dockerfile: "15/Dockerfile.c9s" | |
registry_namespace: "sclorg" | |
tag: "c9s" | |
image_name: "postgresql-15-c9s" | |
quayio_username: "QUAY_IMAGE_SCLORG_BUILDER_USERNAME" | |
quayio_token: "QUAY_IMAGE_SCLORG_BUILDER_TOKEN" | |
docker_context: 15 | |
- dockerfile: "16/Dockerfile.c9s" | |
registry_namespace: "sclorg" | |
tag: "c9s" | |
image_name: "postgresql-16-c9s" | |
quayio_username: "QUAY_IMAGE_SCLORG_BUILDER_USERNAME" | |
quayio_token: "QUAY_IMAGE_SCLORG_BUILDER_TOKEN" | |
docker_context: 16 | |
- dockerfile: "12/Dockerfile.fedora" | |
registry_namespace: "fedora" | |
tag: "12" | |
quayio_username: "QUAY_IMAGE_FEDORA_BUILDER_USERNAME" | |
quayio_token: "QUAY_IMAGE_FEDORA_BUILDER_TOKEN" | |
image_name: "postgresql-12" | |
docker_context: 12 | |
- dockerfile: "13/Dockerfile.fedora" | |
registry_namespace: "fedora" | |
tag: "13" | |
quayio_username: "QUAY_IMAGE_FEDORA_BUILDER_USERNAME" | |
quayio_token: "QUAY_IMAGE_FEDORA_BUILDER_TOKEN" | |
image_name: "postgresql-13" | |
docker_context: 13 | |
- dockerfile: "14/Dockerfile.fedora" | |
registry_namespace: "fedora" | |
tag: "14" | |
quayio_username: "QUAY_IMAGE_FEDORA_BUILDER_USERNAME" | |
quayio_token: "QUAY_IMAGE_FEDORA_BUILDER_TOKEN" | |
image_name: "postgresql-14" | |
docker_context: 14 | |
- dockerfile: "15/Dockerfile.fedora" | |
registry_namespace: "fedora" | |
tag: "15" | |
quayio_username: "QUAY_IMAGE_FEDORA_BUILDER_USERNAME" | |
quayio_token: "QUAY_IMAGE_FEDORA_BUILDER_TOKEN" | |
image_name: "postgresql-15" | |
docker_context: 15 | |
- dockerfile: "16/Dockerfile.fedora" | |
registry_namespace: "fedora" | |
tag: "16" | |
quayio_username: "QUAY_IMAGE_FEDORA_BUILDER_USERNAME" | |
quayio_token: "QUAY_IMAGE_FEDORA_BUILDER_TOKEN" | |
image_name: "postgresql-16" | |
docker_context: 16 | |
steps: | |
- name: check if Dockerfile is c9s, then Build multi arch image and push to quay.io registry | |
if: matrix.dockerfile == '13/Dockerfile.c9s' || matrix.dockerfile == '15/Dockerfile.c9s' || matrix.dockerfile == '16/Dockerfile.c9s' | |
uses: sclorg/build-and-push-action@v4 | |
with: | |
registry: "quay.io" | |
registry_namespace: ${{ matrix.registry_namespace }} | |
registry_username: ${{ secrets[matrix.quayio_username] }} | |
registry_token: ${{ secrets[matrix.quayio_token] }} | |
dockerfile: ${{ matrix.dockerfile }} | |
docker_context: ${{ matrix.docker_context }} | |
tag: ${{ matrix.tag }} | |
image_name: ${{ matrix.image_name }} | |
archs: amd64, s390x, ppc64le, arm64 | |
- name: Check if Dockerfile is not c9s, then Build and push to quay.io registry | |
if: matrix.dockerfile != '13/Dockerfile.c9s' && matrix.dockerfile != '15/Dockerfile.c9s' && matrix.dockerfile != '16/Dockerfile.c9s' | |
uses: sclorg/build-and-push-action@v4 | |
with: | |
registry: "quay.io" | |
registry_namespace: ${{ matrix.registry_namespace }} | |
registry_username: ${{ secrets[matrix.quayio_username] }} | |
registry_token: ${{ secrets[matrix.quayio_token] }} | |
dockerfile: ${{ matrix.dockerfile }} | |
docker_context: ${{ matrix.docker_context }} | |
tag: ${{ matrix.tag }} | |
image_name: ${{ matrix.image_name }} | |
readme: "${{ matrix.docker_context }}/README.md" | |
quay_application_token: ${{ secrets.QUAY_IMAGE_SCLORG_UPDATE_DESC }} |