Skip to content

Commit

Permalink
fix: update PgVecto version retrieval method and adjust Docker build …
Browse files Browse the repository at this point in the history
…args
  • Loading branch information
bhunter234 committed Jan 17, 2025
1 parent 480c92a commit eec0a3b
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,19 @@ jobs:
with:
images: ${{ env.REPOSITORY }}
labels: |
org.opencontainers.image.version=${{ env.BUILD_VERSION }}
org.opencontainers.image.version=${{ env.PG_MAJOR}}
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.title=${{ env.REPOSITORY }}
- name: PgVecto Version
id: pgvecto
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
LATEST_TAG=$(gh api repos/tensorchord/pgvecto.rs/releases/latest --jq .tag_name)
echo "latest_tag=${LATEST_TAG}" >> $GITHUB_OUTPUT
- name: PgVecto Version
id: pgvecto
run: |
LATEST_TAG=$(curl -sL \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/tensorchord/pgvecto.rs/releases/latest" | \
jq -r .tag_name)
echo "latest_tag=${LATEST_TAG}" >> $GITHUB_OUTPUT
- name: Build Image
uses: docker/build-push-action@v6
Expand All @@ -56,9 +58,8 @@ jobs:
push: true
platforms: linux/amd64,linux/arm64
build-args: |
PG_MAJOR
PG_MAJOR=${{ env.PG_MAJOR }}
PGVECTO_TAG=${{ steps.pgvecto.latest_tag }}
labels: ${{ steps.docker_meta.outputs.labels }}
sbom: true
provenance: true
Expand Down

0 comments on commit eec0a3b

Please sign in to comment.