3
0
Fork 0
mirror of https://code.forgejo.org/actions/cache.git synced 2025-12-26 06:46:34 +00:00

Add support for S3 endpoints

This commit is contained in:
Brenden Matthews 2025-03-11 13:29:31 -04:00
parent 1def6032df
commit 7994cabd39
No known key found for this signature in database
GPG key ID: 65458E93BD621972
6 changed files with 11 additions and 5 deletions

View file

@ -36,6 +36,7 @@ if (process.env.RUNS_ON_RUNNER_NAME && process.env.RUNS_ON_RUNNER_NAME !== "") {
const versionSalt = "1.0";
const bucketName = process.env.RUNS_ON_S3_BUCKET_CACHE;
const endpoint = process.env.RUNS_ON_S3_BUCKET_ENDPOINT;
const region =
process.env.RUNS_ON_AWS_REGION ||
process.env.AWS_REGION ||
@ -51,7 +52,7 @@ const downloadQueueSize = Number(process.env.DOWNLOAD_QUEUE_SIZE || "8");
const downloadPartSize =
Number(process.env.DOWNLOAD_PART_SIZE || "16") * 1024 * 1024;
const s3Client = new S3Client({ region, forcePathStyle });
const s3Client = new S3Client({ region, forcePathStyle, endpoint });
export function getCacheVersion(
paths: string[],