fix: update cache control argument handling for S3 sync
All checks were successful
Aikido Security PR Check / Aikido Security Scan (pull_request) Successful in 49s
validate-shared-actions / validate-shared-actions (pull_request) Successful in 26s

This commit is contained in:
Michael.Seele@schmalz.de 2026-06-01 12:35:17 +00:00
parent e05e71fe12
commit 08123e3f56

View file

@ -97,12 +97,12 @@ runs:
fi
# Bulk sync remaining files; versioned builds get immutable cache headers
CACHE_CONTROL_ARG=""
CACHE_CONTROL_ARG=()
if [[ "${INPUT_VERSIONING}" == "true" ]]; then
CACHE_CONTROL_ARG="--cache-control 'public, max-age=31536000, immutable'"
CACHE_CONTROL_ARG=("--cache-control" "public, max-age=31536000, immutable")
fi
aws s3 sync "${INPUT_DIST_DIR}" "s3://${INPUT_S3_BUCKET_NAME}" $CACHE_CONTROL_ARG "${EXCLUDE_ARGS[@]}"
aws s3 sync "${INPUT_DIST_DIR}" "s3://${INPUT_S3_BUCKET_NAME}" "${CACHE_CONTROL_ARG[@]}" "${EXCLUDE_ARGS[@]}"
- name: Clean up old versioned static builds
if: ${{ inputs.versioning == 'true' }}