ci/web: cache uploaded Playwright reports for 30 days

S3 key already includes run_id + attempt-N, so each path is write-once
— bumping cache-control to max-age=2592000 + immutable avoids hammering
S3 on report reloads. Matches the GHA artifact retention.

Co-Authored-By: Agent (authentik-i21994-better-mobile-tangelo) <279763771+playpen-agent@users.noreply.github.com>
This commit is contained in:
Teffen Ellis
2026-05-14 02:30:10 +02:00
parent ecd15507f0
commit 736d52fa86
+4 -1
View File
@@ -231,10 +231,13 @@ jobs:
echo "No playwright-report/ produced; skipping S3 upload"
exit 0
fi
# Reports are stamped with run_id + attempt in S3_KEY_PREFIX, so a given
# key is immutable once written — safe to cache aggressively. 30 days
# matches the retention-days on the GHA artifact upload above.
aws s3 cp \
--recursive \
--acl=public-read \
--cache-control "public, max-age=600" \
--cache-control "public, max-age=2592000, immutable" \
web/playwright-report/ \
"s3://${S3_BUCKET}/${S3_KEY_PREFIX}/"
# Same-repo guard: fork PRs run with a read-only GITHUB_TOKEN (even after