-
Notifications
You must be signed in to change notification settings - Fork 9
/
action.yml
38 lines (38 loc) · 1.33 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Container Deploy
description: ECSサービスを更新し、コンテナをデプロイします。
inputs:
ecs-cluster:
required: true
description: ECSクラスター
ecs-service:
required: true
description: ECSサービス
task-definition:
required: true
description: タスク定義
container-name:
required: true
description: コンテナ名
container-image:
required: true
description: コンテナイメージ
runs:
using: composite
steps:
- run: | # タスク定義の取得
aws ecs describe-task-definition --task-definition "${TASK_DEFINITION}" \
--query taskDefinition --output json > "${RUNNER_TEMP}/task-def.json"
env:
TASK_DEFINITION: ${{ inputs.task-definition }}
shell: bash
- uses: aws-actions/amazon-ecs-render-task-definition@v1 # タスク定義の修正
id: render
with:
task-definition: ${{ runner.temp }}/task-def.json
container-name: ${{ inputs.container-name }}
image: ${{ inputs.container-image }}
- uses: aws-actions/amazon-ecs-deploy-task-definition@v1 # ECSサービスの更新
with:
cluster: ${{ inputs.ecs-cluster }}
service: ${{ inputs.ecs-service }}
task-definition: ${{ steps.render.outputs.task-definition }}