File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed
Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy to ECS
2+
3+ on :
4+ workflow_call :
5+ inputs :
6+ iam_role :
7+ required : true
8+ type : string
9+ region :
10+ required : false
11+ type : string
12+ default : us-east-1
13+ ecs-cluster :
14+ required : true
15+ type : string
16+ files :
17+ required : false
18+ type : string
19+ default : docker-compose.yml:docker-compose.ecs.yml
20+ env :
21+ required : false
22+ type : string
23+ default : ' '
24+ env :
25+ GIT_SHA : ${{ github.sha }}
26+
27+ permissions :
28+ id-token : write
29+ contents : read
30+
31+ jobs :
32+ deploy :
33+
34+ runs-on : ubuntu-latest
35+ steps :
36+ - uses : actions/checkout@v3
37+ - run : echo ${{ inputs.env }} >> $GITHUB_ENV
38+ - uses : docker/setup-buildx-action@v2
39+ - uses : aws-actions/configure-aws-credentials@v1
40+ with :
41+ role-to-assume : ${{ inputs.iam_role }}
42+ role-session-name : withlogicco-workflows-ecs-${{ github.run_id }}
43+ aws-region : ${{ inputs.region }}
44+ - uses : docker/login-action@v1
45+ with :
46+ registry : ${{ inputs.ecr-registry }}
47+ - uses : withlogicco/setup-compose-cli@v1
48+ - run : docker context create ecs aws --from-env
49+ - run : docker --context=aws compose --file ${{ inputs.files }} up
You can’t perform that action at this time.
0 commit comments