File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -282,21 +282,29 @@ jobs:
282
282
283
283
- name : " push|schedule|workflow_dispatch: make ${{ inputs.target }}"
284
284
run : |
285
+ set -Eeuxo pipefail
286
+ # cache the build only if we are not using subscription
287
+ if [[ ${{ inputs.subscription }} == "false" ]]; then
288
+ export CONTAINER_BUILD_CACHE_ARGS="--cache-from ${{ env.CACHE }} --cache-to ${{ env.CACHE }}"
289
+ fi
285
290
make ${{ inputs.target }}
286
291
if : ${{ fromJson(inputs.github).event_name == 'push' ||
287
292
fromJson(inputs.github).event_name == 'schedule' ||
288
293
fromJson(inputs.github).event_name == 'workflow_dispatch' }}
289
294
env :
290
295
IMAGE_TAG : " ${{ steps.calculated_vars.outputs.IMAGE_TAG }}"
291
- CONTAINER_BUILD_CACHE_ARGS : " --cache-from ${{ env.CACHE }} --cache-to ${{ env.CACHE }}"
292
296
- name : " pull_request: make ${{ inputs.target }}"
293
297
run : |
298
+ set -Eeuxo pipefail
299
+ # cache the build only if we are not using subscription
300
+ if [[ ${{ inputs.subscription }} == "false" ]]; then
301
+ export CONTAINER_BUILD_CACHE_ARGS="--cache-from ${{ env.CACHE }}"
302
+ fi
294
303
make ${{ inputs.target }}
295
304
if : " ${{ fromJson(inputs.github).event_name == 'pull_request' ||
296
305
fromJson(inputs.github).event_name == 'pull_request_target' }}"
297
306
env :
298
307
IMAGE_TAG : " ${{ steps.calculated_vars.outputs.IMAGE_TAG }}"
299
- CONTAINER_BUILD_CACHE_ARGS : " --cache-from ${{ env.CACHE }}"
300
308
# We don't have access to image registry, so disable pushing
301
309
PUSH_IMAGES : " no"
302
310
You can’t perform that action at this time.
0 commit comments