Skip to content

Commit 2b28758

Browse files
committed
Push the image cache if inputs.push is set.
1 parent fa3424e commit 2b28758

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.github/workflows/bakery-build-native.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,6 @@ jobs:
200200
- name: Build
201201
env:
202202
GIT_SHA: ${{ github.sha }}
203-
# FIXME: Currently pushes to ghcr.io for caching. Needs to be conditional
204203
run: |
205204
PLATFORM=${BUILD_PLATFORM#linux/} \
206205
bakery build \
@@ -212,8 +211,9 @@ jobs:
212211
--cache-registry "ghcr.io/${{ github.repository_owner }}" \
213212
--temp-registry "ghcr.io/${{ github.repository_owner }}" \
214213
--metadata-file "./${{ matrix.img.image }}-${{ matrix.img.version }}-${{ steps.normalize-platform.outputs.platform }}-metadata.json" \
215-
--context ${{ inputs.context }} \
216-
--push
214+
${{ inputs.push && '--push-cache' || '' }} \
215+
--push \
216+
--context ${{ inputs.context }}
217217
- name: Test
218218
run: |
219219
PLATFORM=${BUILD_PLATFORM#linux/} \

.github/workflows/bakery-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,13 +173,13 @@ jobs:
173173
- name: Build
174174
env:
175175
GIT_SHA: ${{ github.sha }}
176-
# FIXME: Currently pushes to ghcr.io for caching. Needs to be conditional
177176
run: |
178177
bakery build --load \
179178
--image-name '^${{ matrix.img.image }}$' \
180179
--image-version ${{ matrix.img.version }} \
181180
--dev-versions ${{ inputs.dev-versions }} \
182181
--cache-registry "ghcr.io/${{ github.repository_owner }}" \
182+
${{ inputs.push && '--push-cache' || '' }} \
183183
--context ${{ inputs.context }}
184184
185185
- name: Test

0 commit comments

Comments
 (0)