chore(deps): update ghcr.io/cloudnative-pg/postgresql:15.6-16 docker … #21
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: Release | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: read | |
pull-requests: read | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
name: Release | |
outputs: | |
release_created: ${{ steps.release.outputs.release_created }} | |
tag_name: ${{ steps.release.outputs.tag_name }} | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- uses: google-github-actions/release-please-action@v4 | |
id: release | |
container: | |
if: needs.release.outputs.release_created | |
runs-on: ubuntu-latest | |
name: Build (and Push) Container Image | |
needs: | |
- release | |
permissions: | |
contents: write | |
packages: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Setup Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to ghcr.io | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Get Upstream Tags | |
id: from_tag | |
run: | | |
POSTGRESQL_IMAGE=$(cat Dockerfile | grep 'FROM ghcr.io/cloudnative-pg/postgresql:') | |
POSTGRESQL_FROM_TAG=$(echo $POSTGRESQL_IMAGE | cut -d':' -f2 | cut -d'@' -f1) | |
echo "postgresql=${POSTGRESQL_FROM_TAG}" >> "$GITHUB_OUTPUT" | |
PGVECTO_IMAGE=$(cat Dockerfile | grep 'FROM tensorchord/pgvecto-rs-binary:') | |
PGVECTO_FROM_TAG=$(echo $PGVECTO_IMAGE | cut -d'-' -f4) | |
echo "pgvecto=${PGVECTO_FROM_TAG}" >> "$GITHUB_OUTPUT" | |
- name: Build and Push Image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: | | |
ghcr.io/muhlba91/postgresql-pgvecto:latest | |
ghcr.io/muhlba91/postgresql-pgvecto:${{ github.sha }} | |
ghcr.io/muhlba91/postgresql-pgvecto:${{ steps.from_tag.outputs.postgresql }}-${{ steps.from_tag.outputs.pgvecto }} | |
ghcr.io/muhlba91/postgresql-pgvecto:${{ steps.from_tag.outputs.postgresql }}-${{ steps.from_tag.outputs.pgvecto }}-${{ needs.release.outputs.tag_name }} | |
build-args: | | |
CI_COMMIT_TIMESTAMP=${{ github.event.repository.updated_at }} | |
CI_COMMIT_SHA=${{ github.sha }} | |
CI_COMMIT_TAG=${{ steps.from_tag.outputs.postgresql }}-${{ steps.from_tag.outputs.pgvecto }}-${{ needs.release.outputs.tag_name }} | |
CI_UPSTREAM_VERSION=${{ steps.from_tag.outputs.postgresql }}-${{ steps.from_tag.outputs.pgvecto }} |