mirror of
https://github.com/YuzuZensai/cloudnative-vectorchord-pgvecto.rs.git
synced 2026-01-31 14:57:18 +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
|
packages: write
|
||||||
|
|
||||||
jobs:
|
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:
|
build_and_push:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
needs: configure
|
||||||
strategy:
|
strategy:
|
||||||
# Prevent a failure in one image from stopping the other builds
|
# Prevent a failure in one image from stopping the other builds
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix: ${{ fromJson(needs.configure.outputs.matrix) }}
|
||||||
# TODO: Get Renovate to update these
|
|
||||||
cnpgTag:
|
|
||||||
- "14.10"
|
|
||||||
- "15.5"
|
|
||||||
- "16.1"
|
|
||||||
pgvectorsVersion:
|
|
||||||
- "v0.1.11"
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# Setup
|
# Setup
|
||||||
@@ -54,7 +61,7 @@ jobs:
|
|||||||
- name: Set major postgres version
|
- name: Set major postgres version
|
||||||
id: version
|
id: version
|
||||||
run: |
|
run: |
|
||||||
pg_major=$(echo ${{ matrix.cnpgTag }} | cut -d'.' -f1)
|
pg_major=$(echo ${{ matrix.cnpg }} | cut -d'.' -f1)
|
||||||
echo "pg_major=$pg_major" >> "$GITHUB_OUTPUT"
|
echo "pg_major=$pg_major" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Generate docker image tags
|
- name: Generate docker image tags
|
||||||
@@ -69,9 +76,9 @@ jobs:
|
|||||||
tags: |
|
tags: |
|
||||||
type=ref,event=pr
|
type=ref,event=pr
|
||||||
# TODO: When exactly to push these tags?
|
# TODO: When exactly to push these tags?
|
||||||
type=raw,value=${{ matrix.cnpgTag }}-${{ matrix.pgvectorsVersion }}
|
type=raw,value=${{ matrix.cnpg }}-${{ matrix.pgvectors }}
|
||||||
type=raw,value=${{ steps.version.outputs.pg_major }}-${{ matrix.pgvectorsVersion }}
|
type=raw,value=${{ steps.version.outputs.pg_major }}-${{ matrix.pgvectors }}
|
||||||
type=raw,value=${{ matrix.cnpgTag }}
|
type=raw,value=${{ matrix.cnpg }}
|
||||||
type=raw,value=${{ steps.version.outputs.pg_major }}
|
type=raw,value=${{ steps.version.outputs.pg_major }}
|
||||||
|
|
||||||
- name: Build and push image
|
- name: Build and push image
|
||||||
@@ -85,5 +92,5 @@ jobs:
|
|||||||
tags: ${{ steps.metadata.outputs.tags }}
|
tags: ${{ steps.metadata.outputs.tags }}
|
||||||
labels: ${{ steps.metadata.outputs.labels }}
|
labels: ${{ steps.metadata.outputs.labels }}
|
||||||
build-args: |
|
build-args: |
|
||||||
CNPG_TAG=${{ matrix.cnpgTag }}
|
CNPG_TAG=${{ matrix.cnpg }}
|
||||||
PGVECTORS_TAG=${{ matrix.pgvectorsVersion }}
|
PGVECTORS_TAG=${{ matrix.pgvectors }}
|
||||||
|
|||||||
7
versions.yaml
Normal file
7
versions.yaml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
cnpg:
|
||||||
|
# This is a comment
|
||||||
|
- "14.10"
|
||||||
|
- "15.5"
|
||||||
|
- "16.1"
|
||||||
|
pgvectors:
|
||||||
|
- "v0.1.11"
|
||||||
Reference in New Issue
Block a user