mirror of
https://github.com/YuzuZensai/cloudnative-vectorchord-pgvecto.rs.git
synced 2026-01-06 04:33:02 +00:00
feat: conditions for release push (#26)
This commit is contained in:
18
.github/workflows/docker.yml
vendored
18
.github/workflows/docker.yml
vendored
@@ -65,6 +65,15 @@ jobs:
|
||||
uses: tj-actions/changed-files@v40
|
||||
with:
|
||||
files: versions.yaml
|
||||
|
||||
- name: Determine image push
|
||||
uses: actions/github-script@v7
|
||||
id: should-release
|
||||
with:
|
||||
script: |
|
||||
if (context.eventName == "pull_request") return false;
|
||||
if (context.eventName == "workflow_dispatch") return true;
|
||||
return "${{ steps.changed-version.outputs.any_changed }}" == "true";
|
||||
|
||||
- name: Set major postgres version
|
||||
id: version
|
||||
@@ -83,11 +92,10 @@ jobs:
|
||||
name=ghcr.io/${{ github.repository_owner }}/cnpgvecto.rs
|
||||
tags: |
|
||||
type=ref,event=pr
|
||||
# TODO: When exactly to push these tags?
|
||||
type=raw,value=${{ matrix.cnpg }}-${{ matrix.pgvectors }},enable=${{ steps.changed-version.outputs.any_changed == 'true' }}
|
||||
type=raw,value=${{ steps.version.outputs.pg_major }}-${{ matrix.pgvectors }},enable=${{ steps.changed-version.outputs.any_changed == 'true' }}
|
||||
type=raw,value=${{ matrix.cnpg }},enable=${{ steps.changed-version.outputs.any_changed == 'true' }}
|
||||
type=raw,value=${{ steps.version.outputs.pg_major }},enable=${{ steps.changed-version.outputs.any_changed == 'true' }}
|
||||
type=raw,value=${{ matrix.cnpg }}-${{ matrix.pgvectors }},enable=${{ steps.should-release.outputs.result }}
|
||||
type=raw,value=${{ steps.version.outputs.pg_major }}-${{ matrix.pgvectors }},enable=${{ steps.should-release.outputs.result }}
|
||||
type=raw,value=${{ matrix.cnpg }},enable=${{ steps.should-release.outputs.result }}
|
||||
type=raw,value=${{ steps.version.outputs.pg_major }},enable=${{ steps.should-release.outputs.result }}
|
||||
|
||||
- name: Build and push image
|
||||
uses: docker/build-push-action@v5.1.0
|
||||
|
||||
Reference in New Issue
Block a user