Skip to content

Commit 20f1570

Browse files
authored
Merge pull request #355 from rust-lang/bors-prod-workflow-dispatch
ci: trigger production deployment manually
2 parents 1cf40f6 + 7def341 commit 20f1570

File tree

2 files changed

+46
-42
lines changed

2 files changed

+46
-42
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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
Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
name: Deploy
1+
name: Deploy staging
22

33
on:
44
push:
55
branches:
66
- main
77

8-
concurrency: deploy
9-
108
jobs:
119
deploy-to-staging:
1210
name: Deploy to staging
@@ -47,42 +45,3 @@ jobs:
4745

4846
- name: Kick ECS to deploy new version
4947
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

0 commit comments

Comments
 (0)