Add pgrx 0.13.0 and refactor builder-images.yml #148
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 | |
if: github.ref_name == 'main' | |
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: Login to Quay.io | |
uses: docker/login-action@v3 | |
with: | |
registry: quay.io | |
username: ${{ secrets.QUAY_USER }} | |
password: ${{ secrets.QUAY_PASSWORD }} | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: c-builder-pg${{ matrix.pg_version }}-* | |
path: ${{ runner.temp }} | |
- name: Load and push 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 | |
docker push quay.io/coredb/c-builder:pg${{ matrix.pg_version }}-arm64 | |
docker push quay.io/coredb/c-builder:pg${{ matrix.pg_version }}-amd64 | |
- 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 | |
# Push the manifest | |
docker manifest push quay.io/coredb/c-builder:pg${{ matrix.pg_version }} | |
build_and_push_pgrx_builders: | |
needs: build_and_push_c_builders | |
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: ["arm64", "amd64"] | |
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: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Download c-builder | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: c-builder-pg${{ matrix.pg_version }}-${{ matrix.arch }} | |
path: ${{ runner.temp }} | |
- name: Load c-builder | |
run: docker load --input ${{ runner.temp }}/c-builder-pg${{ matrix.pg_version }}-${{ matrix.arch }}/image.tar | |
- name: Build image | |
uses: docker/build-push-action@v6 | |
with: | |
context: cli/images/pgrx-builder | |
push: false | |
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 }} | |
outputs: type=docker,dest=${{ runner.temp }}/image.tar | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
path: ${{ runner.temp }}/image.tar | |
name: pgrx-builder-pg${{ matrix.pg_version }}-pgrx${{ matrix.pgrx_version }}-${{ matrix.arch }} | |
overwrite: true | |
if-no-files-found: error | |
create_and_push_pgrx_manifests: | |
name: 🗂️ pgrx ${{ matrix.pgrx_version }} on 🐘 ${{ matrix.pg_version }} | |
if: github.ref_name == 'main' | |
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: 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: Download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: pgrx-builder-pg${{ matrix.pg_version }}-pgrx${{ matrix.pgrx_version }}-* | |
path: ${{ runner.temp }} | |
- name: Load and push artifacts | |
run: | | |
set -xe | |
docker load --input ${{ runner.temp }}/pgrx-builder-pg${{ matrix.pg_version }}-pgrx${{ matrix.pgrx_version }}-amd64/image.tar | |
docker load --input ${{ runner.temp }}/pgrx-builder-pg${{ matrix.pg_version }}-pgrx${{ matrix.pgrx_version }}-arm64/image.tar | |
docker push quay.io/coredb/pgrx-builder:pg${{ matrix.pg_version }}-pgrx${{ matrix.pgrx_version }}-amd64 | |
docker push quay.io/coredb/pgrx-builder:pg${{ matrix.pg_version }}-pgrx${{ matrix.pgrx_version }}-arm64 | |
- 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 | |
docker manifest push quay.io/coredb/pgrx-builder:pg${{ matrix.pg_version }}-pgrx${{ matrix.pgrx_version }} |