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 @@ -283,21 +283,29 @@ jobs:
283283
284284 - name : " push|schedule|workflow_dispatch: make ${{ inputs.target }}"
285285 run : |
286+ set -Eeuxo pipefail
287+ # cache the build only if we are not using subscription
288+ if [[ ${{ inputs.subscription }} == "false" ]]; then
289+ export CONTAINER_BUILD_CACHE_ARGS="--cache-from ${{ env.CACHE }} --cache-to ${{ env.CACHE }}"
290+ fi
286291 make ${{ inputs.target }}
287292 if : ${{ fromJson(inputs.github).event_name == 'push' ||
288293 fromJson(inputs.github).event_name == 'schedule' ||
289294 fromJson(inputs.github).event_name == 'workflow_dispatch' }}
290295 env :
291296 IMAGE_TAG : " ${{ steps.calculated_vars.outputs.IMAGE_TAG }}"
292- CONTAINER_BUILD_CACHE_ARGS : " --cache-from ${{ env.CACHE }} --cache-to ${{ env.CACHE }}"
293297 - name : " pull_request: make ${{ inputs.target }}"
294298 run : |
299+ set -Eeuxo pipefail
300+ # cache the build only if we are not using subscription
301+ if [[ ${{ inputs.subscription }} == "false" ]]; then
302+ export CONTAINER_BUILD_CACHE_ARGS="--cache-from ${{ env.CACHE }}"
303+ fi
295304 make ${{ inputs.target }}
296305 if : " ${{ fromJson(inputs.github).event_name == 'pull_request' ||
297306 fromJson(inputs.github).event_name == 'pull_request_target' }}"
298307 env :
299308 IMAGE_TAG : " ${{ steps.calculated_vars.outputs.IMAGE_TAG }}"
300- CONTAINER_BUILD_CACHE_ARGS : " --cache-from ${{ env.CACHE }}"
301309 # We don't have access to image registry, so disable pushing
302310 PUSH_IMAGES : " no"
303311
You can’t perform that action at this time.
0 commit comments