Enable building on PG17 #103
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: Build and push C builder images | |
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: 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 | |
run: | | |
set -xe | |
docker build \ | |
--build-arg PG_VERSION=${{ matrix.pg_version }} \ | |
--platform linux/${{ matrix.arch }} \ | |
--tag quay.io/coredb/c-builder:pg${{ matrix.pg_version }}-${{ matrix.arch }} cli/images/c-builder | |
if [ "${BRANCH_NAME}" == "main" ]; then | |
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD) | |
docker push quay.io/coredb/c-builder:pg${{ matrix.pg_version }}-${{ matrix.arch }} | |
fi | |
create_and_push_c_manifests: | |
needs: build_and_push_c_builders | |
name: Build and push c-builder manifests | |
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: Create and push 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 | |
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD) | |
if [ "${BRANCH_NAME}" == "main" ]; then | |
docker manifest push quay.io/coredb/c-builder:pg${{ matrix.pg_version }} | |
fi | |
build_and_push_pgrx_builders: | |
needs: | |
- create_and_push_c_manifests | |
name: Build and push PGRX builder images | |
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.7.4" | |
- "0.8.0" | |
- "0.8.3" | |
- "0.8.4" | |
- "0.9.0" | |
- "0.9.1" | |
- "0.9.7" | |
- "0.9.8" | |
- "0.10.0" | |
- "0.10.1" | |
- "0.10.2" | |
- "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" | |
exclude: | |
- pg_version: "16" | |
pgrx_version: "0.7.4" | |
- pg_version: "16" | |
pgrx_version: "0.8.0" | |
- pg_version: "16" | |
pgrx_version: "0.8.3" | |
- pg_version: "16" | |
pgrx_version: "0.8.4" | |
- pg_version: "16" | |
pgrx_version: "0.9.0" | |
- pg_version: "16" | |
pgrx_version: "0.9.1" | |
- pg_version: "16" | |
pgrx_version: "0.9.7" | |
- pg_version: "16" | |
pgrx_version: "0.9.8" | |
- pg_version: "17" | |
pgrx_version: "0.7.4" | |
- pg_version: "17" | |
pgrx_version: "0.8.0" | |
- pg_version: "17" | |
pgrx_version: "0.8.3" | |
- pg_version: "17" | |
pgrx_version: "0.8.4" | |
- pg_version: "17" | |
pgrx_version: "0.9.0" | |
- pg_version: "17" | |
pgrx_version: "0.9.1" | |
- pg_version: "17" | |
pgrx_version: "0.9.7" | |
- pg_version: "17" | |
pgrx_version: "0.9.8" | |
- pg_version: "17" | |
pgrx_version: "0.10.0" | |
- pg_version: "17" | |
pgrx_version: "0.10.1" | |
- pg_version: "17" | |
pgrx_version: "0.10.2" | |
- 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: Build and push | |
run: | | |
set -xe | |
docker build \ | |
--build-arg PG_VERSION=${{ matrix.pg_version }} \ | |
--build-arg PGRX_VERSION=${{ matrix.pgrx_version }} \ | |
--platform linux/${{ matrix.arch }} \ | |
--tag quay.io/coredb/pgrx-builder:pg${{ matrix.pg_version }}-pgrx${{ matrix.pgrx_version }}-${{ matrix.arch }} cli/images/pgrx-builder | |
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD) | |
if [ "${BRANCH_NAME}" == "main" ]; then | |
docker push quay.io/coredb/pgrx-builder:pg${{ matrix.pg_version }}-pgrx${{ matrix.pgrx_version }}-${{ matrix.arch }} | |
fi | |
create_and_push_pgrx_manifests: | |
name: Build and push PGRX manifests | |
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.7.4" | |
- "0.8.0" | |
- "0.8.3" | |
- "0.8.4" | |
- "0.9.0" | |
- "0.9.1" | |
- "0.9.7" | |
- "0.9.8" | |
- "0.10.0" | |
- "0.10.1" | |
- "0.10.2" | |
- "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" | |
exclude: | |
- pg_version: "16" | |
pgrx_version: "0.7.4" | |
- pg_version: "16" | |
pgrx_version: "0.8.0" | |
- pg_version: "16" | |
pgrx_version: "0.8.3" | |
- pg_version: "16" | |
pgrx_version: "0.8.4" | |
- pg_version: "16" | |
pgrx_version: "0.9.0" | |
- pg_version: "16" | |
pgrx_version: "0.9.1" | |
- pg_version: "16" | |
pgrx_version: "0.9.7" | |
- pg_version: "16" | |
pgrx_version: "0.9.8" | |
- pg_version: "17" | |
pgrx_version: "0.7.4" | |
- pg_version: "17" | |
pgrx_version: "0.8.0" | |
- pg_version: "17" | |
pgrx_version: "0.8.3" | |
- pg_version: "17" | |
pgrx_version: "0.8.4" | |
- pg_version: "17" | |
pgrx_version: "0.9.0" | |
- pg_version: "17" | |
pgrx_version: "0.9.1" | |
- pg_version: "17" | |
pgrx_version: "0.9.7" | |
- pg_version: "17" | |
pgrx_version: "0.9.8" | |
- pg_version: "17" | |
pgrx_version: "0.10.0" | |
- pg_version: "17" | |
pgrx_version: "0.10.1" | |
- pg_version: "17" | |
pgrx_version: "0.10.2" | |
- 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: 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 |