Skip to content

Commit db9a460

Browse files
committed
Temporarily publish docker images on branch
1 parent adeb678 commit db9a460

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ env:
1919
CARGO_TERM_COLOR: always
2020
REGISTRY_USERNAME: lovasoa
2121
REGISTRY_IMAGE: lovasoa/sqlpage
22+
PUBLISH_DOCKER: ${{ github.event_name != 'pull_request' || github.ref == 'refs/heads/duckdb-odbc-docker' }}
2223

2324
jobs:
2425
compile_and_lint:
@@ -165,12 +166,12 @@ jobs:
165166
platforms: ${{ matrix.platform }}
166167
target: ${{ matrix.variant.target }}
167168
labels: ${{ steps.meta.outputs.labels }}
168-
push: ${{ github.event_name != 'pull_request' }}
169+
push: ${{ env.PUBLISH_DOCKER == 'true' }}
169170
tags: ${{ steps.meta.outputs.tags }}
170171
cache-from: type=registry,ref=${{ env.REGISTRY_IMAGE }}:main${{ steps.suffix.outputs.suffix }}
171172
# don't save cache on prs
172173
cache-to: >
173-
${{ github.event_name != 'pull_request'
174+
${{ env.PUBLISH_DOCKER == 'true'
174175
&& format('type=registry,ref={0}:main{1},compression=zstd,mode=max', env.REGISTRY_IMAGE, steps.suffix.outputs.suffix)
175176
|| ''
176177
}}
@@ -191,7 +192,7 @@ jobs:
191192

192193
docker_push:
193194
runs-on: ubuntu-latest
194-
if: github.event_name != 'pull_request'
195+
if: env.PUBLISH_DOCKER == 'true'
195196
needs:
196197
- docker_build
197198
strategy:

0 commit comments

Comments
 (0)