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:
282282
283283 - name : " push|schedule|workflow_dispatch: make ${{ inputs.target }}"
284284 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
285290 make ${{ inputs.target }}
286291 if : ${{ fromJson(inputs.github).event_name == 'push' ||
287292 fromJson(inputs.github).event_name == 'schedule' ||
288293 fromJson(inputs.github).event_name == 'workflow_dispatch' }}
289294 env :
290295 IMAGE_TAG : " ${{ steps.calculated_vars.outputs.IMAGE_TAG }}"
291- CONTAINER_BUILD_CACHE_ARGS : " --cache-from ${{ env.CACHE }} --cache-to ${{ env.CACHE }}"
292296 - name : " pull_request: make ${{ inputs.target }}"
293297 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
294303 make ${{ inputs.target }}
295304 if : " ${{ fromJson(inputs.github).event_name == 'pull_request' ||
296305 fromJson(inputs.github).event_name == 'pull_request_target' }}"
297306 env :
298307 IMAGE_TAG : " ${{ steps.calculated_vars.outputs.IMAGE_TAG }}"
299- CONTAINER_BUILD_CACHE_ARGS : " --cache-from ${{ env.CACHE }}"
300308 # We don't have access to image registry, so disable pushing
301309 PUSH_IMAGES : " no"
302310
You can’t perform that action at this time.
0 commit comments