You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Replace the value of the `ECS_SERVICE` environment variable in the workflow below with the name you set for the Amazon ECS service.
15
-
# Replace the value of the `ECS_CLUSTER` environment variable in the workflow below with the name you set for the cluster.
14
+
# Set the `ECS_SERVICE` and `ECS_CLUSTER` variables in your GitHub repository/environment settings.
16
15
#
17
16
# 3. Store your ECS task definition as a JSON file in your repository.
18
17
# The format should follow the output of `aws ecs register-task-definition --generate-cli-skeleton`.
19
-
# Replace the value of the `ECS_TASK_DEFINITION` environment variable in the workflow below with the path to the JSON file.
20
-
# Replace the value of the `CONTAINER_NAME` environment variable in the workflow below with the name of the container
21
-
# in the `containerDefinitions` section of the task definition.
18
+
# Set the `ECS_TASK_DEFINITION` and `CONTAINER_NAME` variables in your GitHub repository/environment settings.
22
19
#
23
-
# 4. Store an IAM user access key in GitHub Actions secrets named `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`.
24
-
# See the documentation for each action used below for the recommended IAM policies for this IAM user,
25
-
# and best practices on handling the access key credentials.
20
+
# 4. Configure GitHub OIDC for AWS and create an IAM role that GitHub Actions can assume.
21
+
# Store the IAM role ARN in a GitHub Actions secret named `AWS_ROLE_ARN`.
22
+
# See https://docs.github.com/en/actions/security-for-github-actions/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services
23
+
# for setup instructions and recommended IAM policies.
26
24
27
25
name: Deploy to Amazon ECS
28
26
29
27
on:
30
-
workflow_dispatch
31
-
# push:
32
-
# branches: [ "main" ]
28
+
workflow_dispatch:
33
29
34
30
env:
35
-
AWS_REGION: MY_AWS_REGION # set this to your preferred AWS region, e.g. us-west-1
36
-
ECR_REPOSITORY: MY_ECR_REPOSITORY # set this to your Amazon ECR repository name
37
-
ECS_SERVICE: MY_ECS_SERVICE # set this to your Amazon ECS service name
38
-
ECS_CLUSTER: MY_ECS_CLUSTER # set this to your Amazon ECS cluster name
39
-
ECS_TASK_DEFINITION: MY_ECS_TASK_DEFINITION # set this to the path to your Amazon ECS task definition
40
-
# file, e.g. .aws/task-definition.json
41
-
CONTAINER_NAME: MY_CONTAINER_NAME # set this to the name of the container in the
42
-
# containerDefinitions section of your task definition
0 commit comments