File tree Expand file tree Collapse file tree 1 file changed +41
-1
lines changed Expand file tree Collapse file tree 1 file changed +41
-1
lines changed Original file line number Diff line number Diff line change 8
8
concurrency : deploy
9
9
10
10
jobs :
11
- deploy :
11
+ deploy-to-staging :
12
12
name : Deploy
13
13
runs-on : ubuntu-latest
14
+ environment : staging
15
+ concurrency : staging
14
16
permissions :
15
17
id-token : write
16
18
contents : read
44
46
45
47
- name : Kick ECS to deploy new version
46
48
run : aws ecs update-service --service bors --cluster bors --force-new-deployment
49
+ deploy-to-production :
50
+ name : Deploy
51
+ runs-on : ubuntu-latest
52
+ environment : production
53
+ concurrency : production
54
+ permissions :
55
+ id-token : write
56
+ contents : read
57
+ steps :
58
+ - name : Checkout repo
59
+ uses : actions/checkout@v3
60
+
61
+ - name : Configure AWS credentials
62
+ uses : aws-actions/configure-aws-credentials@v2
63
+ with :
64
+ role-to-assume : arn:aws:iam::351621253146:role/gha-access
65
+ aws-region : us-east-2
66
+
67
+ - name : Login to Amazon ECR
68
+ id : login-ecr
69
+ uses : aws-actions/amazon-ecr-login@v1
70
+
71
+ - uses : docker/setup-buildx-action@v2
72
+ - name : Build and tag the Docker image
73
+ env :
74
+ REGISTRY : ${{ steps.login-ecr.outputs.registry }}
75
+ REPOSITORY : bors
76
+ IMAGE_TAG : latest
77
+ uses : docker/build-push-action@v4
78
+ with :
79
+ context : .
80
+ tags : ${{ env.REGISTRY }}/${{ env.REPOSITORY }}:${{ env.IMAGE_TAG }}
81
+ push : true
82
+ cache-from : type=gha
83
+ cache-to : type=gha,mode=max
84
+
85
+ - name : Kick ECS to deploy new version
86
+ run : aws ecs update-service --service bors --cluster bors --force-new-deployment
You can’t perform that action at this time.
0 commit comments