mirror of
https://github.com/YuzuZensai/cloudnative-vectorchord-pgvecto.rs.git
synced 2026-01-06 04:33:02 +00:00
chore(ci): Read version matrix from file
This commit is contained in:
35
.github/workflows/docker.yml
vendored
35
.github/workflows/docker.yml
vendored
@@ -17,19 +17,26 @@ permissions:
|
||||
packages: write
|
||||
|
||||
jobs:
|
||||
configure:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
matrix: ${{ steps.get-versions.outputs.result }}
|
||||
steps:
|
||||
- name: Checkout to repository
|
||||
uses: actions/checkout@v3
|
||||
- name: Get dependency versions
|
||||
uses: mikefarah/yq@v4.9.8
|
||||
id: get-versions
|
||||
with:
|
||||
cmd: yq eval -j -I=0 versions.yaml
|
||||
|
||||
build_and_push:
|
||||
runs-on: ubuntu-latest
|
||||
needs: configure
|
||||
strategy:
|
||||
# Prevent a failure in one image from stopping the other builds
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# TODO: Get Renovate to update these
|
||||
cnpgTag:
|
||||
- "14.10"
|
||||
- "15.5"
|
||||
- "16.1"
|
||||
pgvectorsVersion:
|
||||
- "v0.1.11"
|
||||
matrix: ${{ fromJson(needs.configure.outputs.matrix) }}
|
||||
|
||||
steps:
|
||||
# Setup
|
||||
@@ -54,7 +61,7 @@ jobs:
|
||||
- name: Set major postgres version
|
||||
id: version
|
||||
run: |
|
||||
pg_major=$(echo ${{ matrix.cnpgTag }} | cut -d'.' -f1)
|
||||
pg_major=$(echo ${{ matrix.cnpg }} | cut -d'.' -f1)
|
||||
echo "pg_major=$pg_major" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Generate docker image tags
|
||||
@@ -69,9 +76,9 @@ jobs:
|
||||
tags: |
|
||||
type=ref,event=pr
|
||||
# TODO: When exactly to push these tags?
|
||||
type=raw,value=${{ matrix.cnpgTag }}-${{ matrix.pgvectorsVersion }}
|
||||
type=raw,value=${{ steps.version.outputs.pg_major }}-${{ matrix.pgvectorsVersion }}
|
||||
type=raw,value=${{ matrix.cnpgTag }}
|
||||
type=raw,value=${{ matrix.cnpg }}-${{ matrix.pgvectors }}
|
||||
type=raw,value=${{ steps.version.outputs.pg_major }}-${{ matrix.pgvectors }}
|
||||
type=raw,value=${{ matrix.cnpg }}
|
||||
type=raw,value=${{ steps.version.outputs.pg_major }}
|
||||
|
||||
- name: Build and push image
|
||||
@@ -85,5 +92,5 @@ jobs:
|
||||
tags: ${{ steps.metadata.outputs.tags }}
|
||||
labels: ${{ steps.metadata.outputs.labels }}
|
||||
build-args: |
|
||||
CNPG_TAG=${{ matrix.cnpgTag }}
|
||||
PGVECTORS_TAG=${{ matrix.pgvectorsVersion }}
|
||||
CNPG_TAG=${{ matrix.cnpg }}
|
||||
PGVECTORS_TAG=${{ matrix.pgvectors }}
|
||||
|
||||
Reference in New Issue
Block a user