Merge pull request 'fix: update cache control argument handling for S3 sync' (#38) from bugfix/CACHE_CONTROL_ARG into main

Reviewed-on: #38
Reviewed-by: Böhringer_Sebastian_-_J._Schmalz_GmbH <Sebastian.Boehringer@schmalz.de>
This commit is contained in:
Michael.Seele@schmalz.de 2026-06-01 12:44:17 +00:00
commit 909fb37930
Signed by: schmalz-git.git.onstackit.cloud
GPG key ID: 569DFBE669A0D544

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' }}