diff --git a/.github/spot-runner-action/dist/index.js b/.github/spot-runner-action/dist/index.js index d50843ad54d..1b271e11402 100644 --- a/.github/spot-runner-action/dist/index.js +++ b/.github/spot-runner-action/dist/index.js @@ -315,10 +315,11 @@ class Ec2Instance { SubnetId: this.config.githubActionRunnerConcurrency > 0 ? this.config.ec2SubnetId : undefined, })), }; + const clientToken = this.config.clientToken ? this.config.clientToken + ",spot=" + useOnDemand : undefined; const createFleetRequest = { Type: "instant", LaunchTemplateConfigs: [fleetLaunchConfig], - ClientToken: this.config.clientToken || undefined, + ClientToken: clientToken, SpotOptions: { AllocationStrategy: "capacity-optimized", }, diff --git a/.github/spot-runner-action/src/ec2.ts b/.github/spot-runner-action/src/ec2.ts index ff82e6cc01c..83211f7bba4 100644 --- a/.github/spot-runner-action/src/ec2.ts +++ b/.github/spot-runner-action/src/ec2.ts @@ -234,10 +234,11 @@ export class Ec2Instance { SubnetId: this.config.githubActionRunnerConcurrency > 0 ? this.config.ec2SubnetId : undefined, })), }; + const clientToken = this.config.clientToken ?this.config.clientToken + ",spot=" + useOnDemand : undefined; const createFleetRequest: CreateFleetRequest = { Type: "instant", LaunchTemplateConfigs: [fleetLaunchConfig], - ClientToken: this.config.clientToken || undefined, + ClientToken: clientToken, SpotOptions: { AllocationStrategy: "capacity-optimized", },