mirror of
https://github.com/YuzuZensai/cloudnative-vectorchord-pgvecto.rs.git
synced 2026-01-31 14:57:18 +00:00
chore(ci): Only push release tags when versions change
This commit is contained in:
18
.github/workflows/docker.yml
vendored
18
.github/workflows/docker.yml
vendored
@@ -43,6 +43,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v3.0.0
|
uses: docker/setup-qemu-action@v3.0.0
|
||||||
@@ -58,6 +60,12 @@ jobs:
|
|||||||
username: ${{ github.repository_owner }}
|
username: ${{ github.repository_owner }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Determine version change
|
||||||
|
id: changed-version
|
||||||
|
uses: tj-actions/changed-files@v40
|
||||||
|
with:
|
||||||
|
files: versions.yaml
|
||||||
|
|
||||||
- name: Set major postgres version
|
- name: Set major postgres version
|
||||||
id: version
|
id: version
|
||||||
run: |
|
run: |
|
||||||
@@ -76,17 +84,17 @@ 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.cnpg }}-${{ matrix.pgvectors }}
|
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 }}
|
type=raw,value=${{ steps.version.outputs.pg_major }}-${{ matrix.pgvectors }},enable=${{ steps.changed-version.outputs.any_changed == 'true' }}
|
||||||
type=raw,value=${{ matrix.cnpg }}
|
type=raw,value=${{ matrix.cnpg }},enable=${{ steps.changed-version.outputs.any_changed == 'true' }}
|
||||||
type=raw,value=${{ steps.version.outputs.pg_major }}
|
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@v4.1.1
|
uses: docker/build-push-action@v4.1.1
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
push: ${{ !github.event.pull_request }}
|
push: ${{ !github.event.pull_request.head.repo.fork && steps.metadata.outputs.tags != '' }}
|
||||||
cache-from: type=gha
|
cache-from: type=gha
|
||||||
cache-to: type=gha,mode=max
|
cache-to: type=gha,mode=max
|
||||||
tags: ${{ steps.metadata.outputs.tags }}
|
tags: ${{ steps.metadata.outputs.tags }}
|
||||||
|
|||||||
Reference in New Issue
Block a user