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