Add pgrx 0.13.0 and refactor builder-images.yml #139
Workflow file for this run
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: Trunk builder images | |
on: | |
push: | |
branches: | |
- "main" | |
paths: | |
- "cli/images/**" | |
- ".github/workflows/builder-images.yml" | |
pull_request: | |
branches: | |
- "main" | |
paths: | |
- "cli/images/**" | |
- ".github/workflows/builder-images.yml" | |
jobs: | |
build_and_push_c_builders: | |
name: 🧱 ${{ matrix.arch }} C on 🐘 ${{ matrix.pg_version }} | |
runs-on: | |
- self-hosted | |
- dind | |
- ${{ matrix.arch == 'amd64' && 'large-8x8' || 'large-8x8-arm64' }} | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: ["arm64", "amd64"] | |
pg_version: ["14"] #, "15", "16", "17"] | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build image | |
uses: docker/build-push-action@v6 | |
with: | |
context: cli/images/c-builder | |
push: false | |
build-args: PG_VERSION=${{ matrix.pg_version }} | |
platforms: linux/${{ matrix.arch }} | |
tags: quay.io/coredb/c-builder:pg${{ matrix.pg_version }}-${{ matrix.arch }} | |
outputs: type=docker,dest=${{ runner.temp }}/image.tar | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
path: ${{ runner.temp }}/image.tar | |
name: c-builder-pg${{ matrix.pg_version }}-${{ matrix.arch }} | |
overwrite: true | |
if-no-files-found: error | |
create_and_push_c_manifests: | |
needs: build_and_push_c_builders | |
name: 🗂️ C on 🐘 ${{ matrix.pg_version }} | |
runs-on: | |
- self-hosted | |
- dind | |
- large-8x8 | |
strategy: | |
matrix: | |
pg_version: ["14"] #, "15", "16", "17"] | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: c-builder-pg${{ matrix.pg_version }}-* | |
path: ${{ runner.temp }} | |
- run: ls -R ${{ runner.temp }}/ | |
- name: Load artifacts | |
run: | | |
set -xe | |
docker load --input ${{ runner.temp }}/c-builder-pg${{ matrix.pg_version }}-amd64/image.tar | |
docker load --input ${{ runner.temp }}/c-builder-pg${{ matrix.pg_version }}-arm64/image.tar | |
- name: Create manifest | |
run: | | |
set -xe | |
# Create the manifest | |
docker manifest create \ | |
quay.io/coredb/c-builder:pg${{ matrix.pg_version }} \ | |
quay.io/coredb/c-builder:pg${{ matrix.pg_version }}-amd64 \ | |
quay.io/coredb/c-builder:pg${{ matrix.pg_version }}-arm64 | |
# Annotate the manifest with architecture and OS information | |
docker manifest annotate quay.io/coredb/c-builder:pg${{ matrix.pg_version }} \ | |
quay.io/coredb/c-builder:pg${{ matrix.pg_version }}-amd64 \ | |
--os linux --arch amd64 | |
docker manifest annotate quay.io/coredb/c-builder:pg${{ matrix.pg_version }} \ | |
quay.io/coredb/c-builder:pg${{ matrix.pg_version }}-arm64 \ | |
--os linux --arch arm64 | |
- name: Login to Quay.io | |
if: github.github.ref_name == 'main' | |
uses: docker/login-action@v3 | |
with: | |
registry: quay.io | |
username: ${{ secrets.QUAY_USER }} | |
password: ${{ secrets.QUAY_PASSWORD }} | |
- name: Push the manifest | |
if: github.github.ref_name == 'main' | |
run: | |
set -xe | |
docker push quay.io/coredb/c-builder:pg${{ matrix.pg_version }}-arm64 | |
docker push quay.io/coredb/c-builder:pg${{ matrix.pg_version }}-amd64 | |
docker manifest push quay.io/coredb/c-builder:pg${{ matrix.pg_version }} | |
# build_and_push_pgrx_builders: | |
# needs: | |
# - create_and_push_c_manifests | |
# name: 🦀 ${{ matrix.arch }} pgrx ${{ matrix.pgrx_version }} on 🐘 ${{ matrix.pg_version }} | |
# runs-on: | |
# - self-hosted | |
# - dind | |
# - ${{ matrix.arch == 'amd64' && 'large-8x8' || 'large-8x8-arm64' }} | |
# strategy: | |
# fail-fast: false | |
# matrix: | |
# arch: | |
# - "amd64" | |
# - "arm64" | |
# pg_version: | |
# - "14" | |
# - "15" | |
# - "16" | |
# - "17" | |
# pgrx_version: | |
# - "0.11.0" | |
# - "0.11.1" | |
# - "0.11.2" | |
# - "0.11.3" | |
# - "0.11.4" | |
# - "0.12.0" | |
# - "0.12.1" | |
# - "0.12.2" | |
# - "0.12.3" | |
# - "0.12.4" | |
# - "0.12.5" | |
# - "0.12.6" | |
# - "0.12.7" | |
# - "0.12.8" | |
# - "0.12.9" | |
# - "0.13.0" | |
# exclude: | |
# - pg_version: "17" | |
# pgrx_version: "0.11.0" | |
# - pg_version: "17" | |
# pgrx_version: "0.11.1" | |
# - pg_version: "17" | |
# pgrx_version: "0.11.2" | |
# - pg_version: "17" | |
# pgrx_version: "0.11.3" | |
# - pg_version: "17" | |
# pgrx_version: "0.11.4" | |
# - pg_version: "17" | |
# pgrx_version: "0.12.0" | |
# - pg_version: "17" | |
# pgrx_version: "0.12.1" | |
# - pg_version: "17" | |
# pgrx_version: "0.12.2" | |
# - pg_version: "17" | |
# pgrx_version: "0.12.3" | |
# - pg_version: "17" | |
# pgrx_version: "0.12.4" | |
# steps: | |
# - name: Check out the repo | |
# uses: actions/checkout@v4 | |
# - name: Login to Docker Hub | |
# uses: docker/login-action@v3 | |
# with: | |
# username: ${{ secrets.DOCKERHUB_USERNAME }} | |
# password: ${{ secrets.DOCKERHUB_TOKEN }} | |
# - name: Set up Docker Buildx | |
# uses: docker/setup-buildx-action@v3 | |
# - name: Login to Quay.io | |
# uses: docker/login-action@v3 | |
# with: | |
# registry: quay.io | |
# username: ${{ secrets.QUAY_USER }} | |
# password: ${{ secrets.QUAY_PASSWORD }} | |
# - name: Build and push | |
# uses: docker/build-push-action@v6 | |
# with: | |
# push: ${{ github.github.ref_name == 'main' }} | |
# context: cli/images/c-builder | |
# build-args: | | |
# PG_VERSION=${{ matrix.pg_version }} | |
# PGRX_VERSION=${{ matrix.pgrx_version }} | |
# platforms: linux/${{ matrix.arch }} | |
# tags: quay.io/coredb/pgrx-builder:pg${{ matrix.pg_version }}-pgrx${{ matrix.pgrx_version }}-${{ matrix.arch }} | |
# create_and_push_pgrx_manifests: | |
# name: 🗂️ pgrx ${{ matrix.pgrx_version }} on 🐘 ${{ matrix.pg_version }} | |
# needs: | |
# - build_and_push_pgrx_builders | |
# runs-on: | |
# - self-hosted | |
# - dind | |
# - large-8x8 | |
# strategy: | |
# fail-fast: false | |
# matrix: | |
# pg_version: | |
# - "14" | |
# - "15" | |
# - "16" | |
# - "17" | |
# pgrx_version: | |
# - "0.11.0" | |
# - "0.11.1" | |
# - "0.11.2" | |
# - "0.11.3" | |
# - "0.11.4" | |
# - "0.12.0" | |
# - "0.12.1" | |
# - "0.12.2" | |
# - "0.12.3" | |
# - "0.12.4" | |
# - "0.12.5" | |
# - "0.12.6" | |
# - "0.12.7" | |
# - "0.12.8" | |
# - "0.12.9" | |
# - "0.13.0" | |
# exclude: | |
# - pg_version: "17" | |
# pgrx_version: "0.11.0" | |
# - pg_version: "17" | |
# pgrx_version: "0.11.1" | |
# - pg_version: "17" | |
# pgrx_version: "0.11.2" | |
# - pg_version: "17" | |
# pgrx_version: "0.11.3" | |
# - pg_version: "17" | |
# pgrx_version: "0.11.4" | |
# - pg_version: "17" | |
# pgrx_version: "0.12.0" | |
# - pg_version: "17" | |
# pgrx_version: "0.12.1" | |
# - pg_version: "17" | |
# pgrx_version: "0.12.2" | |
# - pg_version: "17" | |
# pgrx_version: "0.12.3" | |
# - pg_version: "17" | |
# pgrx_version: "0.12.4" | |
# steps: | |
# - name: Check out the repo | |
# uses: actions/checkout@v4 | |
# - name: Login to Docker Hub | |
# uses: docker/login-action@v3 | |
# with: | |
# username: ${{ secrets.DOCKERHUB_USERNAME }} | |
# password: ${{ secrets.DOCKERHUB_TOKEN }} | |
# - name: Set up Docker Buildx | |
# uses: docker/setup-buildx-action@v3 | |
# - name: Login to Quay.io | |
# uses: docker/login-action@v3 | |
# with: | |
# registry: quay.io | |
# username: ${{ secrets.QUAY_USER }} | |
# password: ${{ secrets.QUAY_PASSWORD }} | |
# - name: Create and push manifest | |
# run: | | |
# set -xe | |
# # Create the manifest | |
# docker manifest create \ | |
# quay.io/coredb/pgrx-builder:pg${{ matrix.pg_version }}-pgrx${{ matrix.pgrx_version }} \ | |
# --amend quay.io/coredb/pgrx-builder:pg${{ matrix.pg_version }}-pgrx${{ matrix.pgrx_version }}-amd64 \ | |
# --amend quay.io/coredb/pgrx-builder:pg${{ matrix.pg_version }}-pgrx${{ matrix.pgrx_version }}-arm64 | |
# # Annotate the manifest with architecture and OS information | |
# docker manifest annotate quay.io/coredb/pgrx-builder:pg${{ matrix.pg_version }}-pgrx${{ matrix.pgrx_version }} \ | |
# quay.io/coredb/pgrx-builder:pg${{ matrix.pg_version }}-pgrx${{ matrix.pgrx_version }}-amd64 \ | |
# --os linux --arch amd64 | |
# docker manifest annotate quay.io/coredb/pgrx-builder:pg${{ matrix.pg_version }}-pgrx${{ matrix.pgrx_version }} \ | |
# quay.io/coredb/pgrx-builder:pg${{ matrix.pg_version }}-pgrx${{ matrix.pgrx_version }}-arm64 \ | |
# --os linux --arch arm64 | |
# # Push the manifest | |
# BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD) | |
# if [ "${BRANCH_NAME}" == "main" ]; then | |
# docker manifest push quay.io/coredb/pgrx-builder:pg${{ matrix.pg_version }}-pgrx${{ matrix.pgrx_version }} | |
# fi |