diff --git a/README.md b/README.md index c0b9ae0..0ee137c 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,7 @@ Be aware of S3 transfer costs if your runners are not in the same AWS region as ## Special environment variables * `RUNS_ON_S3_BUCKET_CACHE`: if set, the action will use this bucket to store the cache. +* `RUNS_ON_S3_BUCKET_ENDPOINT`: if set, the action will use this endpoint to connect to the bucket. This is useful if you are using AWS's S3 transfer acceleration or a non-AWS S3-compatible service. * `RUNS_ON_RUNNER_NAME`: when running on RunsOn, where this environment variable is non-empty, existing AWS credentials from the environment will be discarded. If you want to preserve existing environment variables, set this to the empty string `""`. * `RUNS_ON_S3_FORCE_PATH_STYLE` or `AWS_S3_FORCE_PATH_STYLE`: if one of those environment variables equals the string `"true"`, then the S3 client will be configured to force the path style. diff --git a/dist/restore-only/index.js b/dist/restore-only/index.js index bba89d9..9aaa4cb 100644 --- a/dist/restore-only/index.js +++ b/dist/restore-only/index.js @@ -93784,6 +93784,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 || process.env.AWS_DEFAULT_REGION; @@ -93793,7 +93794,7 @@ const uploadQueueSize = Number(process.env.UPLOAD_QUEUE_SIZE || "4"); const uploadPartSize = Number(process.env.UPLOAD_PART_SIZE || "32") * 1024 * 1024; const downloadQueueSize = Number(process.env.DOWNLOAD_QUEUE_SIZE || "8"); const downloadPartSize = Number(process.env.DOWNLOAD_PART_SIZE || "16") * 1024 * 1024; -const s3Client = new client_s3_1.S3Client({ region, forcePathStyle }); +const s3Client = new client_s3_1.S3Client({ region, forcePathStyle, endpoint }); function getCacheVersion(paths, compressionMethod, enableCrossOsArchive = false) { // don't pass changes upstream const components = paths.slice(); diff --git a/dist/restore/index.js b/dist/restore/index.js index 5795956..10f3788 100644 --- a/dist/restore/index.js +++ b/dist/restore/index.js @@ -93784,6 +93784,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 || process.env.AWS_DEFAULT_REGION; @@ -93793,7 +93794,7 @@ const uploadQueueSize = Number(process.env.UPLOAD_QUEUE_SIZE || "4"); const uploadPartSize = Number(process.env.UPLOAD_PART_SIZE || "32") * 1024 * 1024; const downloadQueueSize = Number(process.env.DOWNLOAD_QUEUE_SIZE || "8"); const downloadPartSize = Number(process.env.DOWNLOAD_PART_SIZE || "16") * 1024 * 1024; -const s3Client = new client_s3_1.S3Client({ region, forcePathStyle }); +const s3Client = new client_s3_1.S3Client({ region, forcePathStyle, endpoint }); function getCacheVersion(paths, compressionMethod, enableCrossOsArchive = false) { // don't pass changes upstream const components = paths.slice(); diff --git a/dist/save-only/index.js b/dist/save-only/index.js index 7ab2a86..c83ae6c 100644 --- a/dist/save-only/index.js +++ b/dist/save-only/index.js @@ -93784,6 +93784,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 || process.env.AWS_DEFAULT_REGION; @@ -93793,7 +93794,7 @@ const uploadQueueSize = Number(process.env.UPLOAD_QUEUE_SIZE || "4"); const uploadPartSize = Number(process.env.UPLOAD_PART_SIZE || "32") * 1024 * 1024; const downloadQueueSize = Number(process.env.DOWNLOAD_QUEUE_SIZE || "8"); const downloadPartSize = Number(process.env.DOWNLOAD_PART_SIZE || "16") * 1024 * 1024; -const s3Client = new client_s3_1.S3Client({ region, forcePathStyle }); +const s3Client = new client_s3_1.S3Client({ region, forcePathStyle, endpoint }); function getCacheVersion(paths, compressionMethod, enableCrossOsArchive = false) { // don't pass changes upstream const components = paths.slice(); diff --git a/dist/save/index.js b/dist/save/index.js index ed920df..b8e3006 100644 --- a/dist/save/index.js +++ b/dist/save/index.js @@ -93784,6 +93784,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 || process.env.AWS_DEFAULT_REGION; @@ -93793,7 +93794,7 @@ const uploadQueueSize = Number(process.env.UPLOAD_QUEUE_SIZE || "4"); const uploadPartSize = Number(process.env.UPLOAD_PART_SIZE || "32") * 1024 * 1024; const downloadQueueSize = Number(process.env.DOWNLOAD_QUEUE_SIZE || "8"); const downloadPartSize = Number(process.env.DOWNLOAD_PART_SIZE || "16") * 1024 * 1024; -const s3Client = new client_s3_1.S3Client({ region, forcePathStyle }); +const s3Client = new client_s3_1.S3Client({ region, forcePathStyle, endpoint }); function getCacheVersion(paths, compressionMethod, enableCrossOsArchive = false) { // don't pass changes upstream const components = paths.slice(); diff --git a/src/custom/backend.ts b/src/custom/backend.ts index cb01941..a9146be 100644 --- a/src/custom/backend.ts +++ b/src/custom/backend.ts @@ -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[],