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