GitHub ActionsでECSのタスク定義のみを更新する
GitHub ActionsでECSサービスをデプロイするときによく使われる aws-actions/amazon-ecs-deploy-task-definition ですが、 タスク定義のみを更新することもできます。READMEのサンプルコードにはその例がないので、気づきにくいです。
inputs: task-definition: description: 'The path to the ECS task definition file to register' required: true service: description: 'The name of the ECS service to deploy to. The action will only register the task definition if no service is given.' required: false
inputsにtask-definitionだけ入力してあげるだけでOKです。
# 中略 - name: register new task definition family uses: aws-actions/amazon-ecs-deploy-task-definition@v1 with: task-definition: ${{ steps.render-container.outputs.task-definition }}
ECS Scheduled Taskでバッチ処理するタスク定義の更新などで活用できると思います。