Skip to content

Commit

Permalink
feat: Release v1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Aug 18, 2023
1 parent 081f938 commit e9dcded
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 24 deletions.
8 changes: 5 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ runs:
using: node16
main: 'index.js'
inputs:
token:
family:
required: true
description: Authenticated GitHub token.
default: '${{ github.token }}'
description: Name of the task definition family to where fetch the latest revision and create a new revision.
images:
required: true
description: Map of the container name and the image URI to update in the task definition. Must be `container_name=image_uri` format.
43 changes: 22 additions & 21 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28201,27 +28201,28 @@ var getInputRequired = (name) => (0, import_core.getInput)(name, {
});
let newTaskDefinitionArn = "";
await (0, import_core.group)("Updating the task definition", async () => {
const response = await client.send(
new import_client_ecs.RegisterTaskDefinitionCommand({
family,
containerDefinitions: taskDefinition.containerDefinitions,
cpu: taskDefinition.cpu,
ephemeralStorage: taskDefinition.ephemeralStorage,
executionRoleArn: taskDefinition.executionRoleArn,
inferenceAccelerators: taskDefinition.inferenceAccelerators,
ipcMode: taskDefinition.ipcMode,
memory: taskDefinition.memory,
networkMode: taskDefinition.networkMode,
pidMode: taskDefinition.pidMode,
placementConstraints: taskDefinition.placementConstraints,
proxyConfiguration: taskDefinition.proxyConfiguration,
requiresCompatibilities: taskDefinition.requiresCompatibilities,
runtimePlatform: taskDefinition.runtimePlatform,
tags,
taskRoleArn: taskDefinition.taskRoleArn,
volumes: taskDefinition.volumes
})
);
const command = new import_client_ecs.RegisterTaskDefinitionCommand({
family,
containerDefinitions: taskDefinition.containerDefinitions,
cpu: taskDefinition.cpu,
ephemeralStorage: taskDefinition.ephemeralStorage,
executionRoleArn: taskDefinition.executionRoleArn,
inferenceAccelerators: taskDefinition.inferenceAccelerators,
ipcMode: taskDefinition.ipcMode,
memory: taskDefinition.memory,
networkMode: taskDefinition.networkMode,
pidMode: taskDefinition.pidMode,
placementConstraints: taskDefinition.placementConstraints,
proxyConfiguration: taskDefinition.proxyConfiguration,
requiresCompatibilities: taskDefinition.requiresCompatibilities,
runtimePlatform: taskDefinition.runtimePlatform,
taskRoleArn: taskDefinition.taskRoleArn,
volumes: taskDefinition.volumes
});
if ((tags?.length ?? 0) > 0) {
command.input.tags = tags;
}
const response = await client.send(command);
const arn = response.taskDefinition?.taskDefinitionArn;
if (!arn) {
throw new Error("Could not update the task definition.");
Expand Down

0 comments on commit e9dcded

Please sign in to comment.