mirror of
https://github.com/YuzuZensai/cloudnative-vectorchord-pgvecto.rs.git
synced 2026-01-31 14:57:18 +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
|
uses: tj-actions/changed-files@v40
|
||||||
with:
|
with:
|
||||||
files: versions.yaml
|
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
|
- name: Set major postgres version
|
||||||
id: version
|
id: version
|
||||||
@@ -83,11 +92,10 @@ jobs:
|
|||||||
name=ghcr.io/${{ github.repository_owner }}/cnpgvecto.rs
|
name=ghcr.io/${{ github.repository_owner }}/cnpgvecto.rs
|
||||||
tags: |
|
tags: |
|
||||||
type=ref,event=pr
|
type=ref,event=pr
|
||||||
# TODO: When exactly to push these tags?
|
type=raw,value=${{ matrix.cnpg }}-${{ matrix.pgvectors }},enable=${{ steps.should-release.outputs.result }}
|
||||||
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.should-release.outputs.result }}
|
||||||
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.should-release.outputs.result }}
|
||||||
type=raw,value=${{ matrix.cnpg }},enable=${{ steps.changed-version.outputs.any_changed == 'true' }}
|
type=raw,value=${{ steps.version.outputs.pg_major }},enable=${{ steps.should-release.outputs.result }}
|
||||||
type=raw,value=${{ steps.version.outputs.pg_major }},enable=${{ steps.changed-version.outputs.any_changed == 'true' }}
|
|
||||||
|
|
||||||
- name: Build and push image
|
- name: Build and push image
|
||||||
uses: docker/build-push-action@v5.1.0
|
uses: docker/build-push-action@v5.1.0
|
||||||
|
|||||||
Reference in New Issue
Block a user