Skip to content

Commit 4038abc

Browse files
authored
Create deploy-production.yml
1 parent 7c6657b commit 4038abc

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Deploy Production
2+
3+
on:
4+
push:
5+
tags: ['v*.*.*'] # semantic-version tag triggers
6+
7+
jobs:
8+
promote:
9+
runs-on: ubuntu-latest
10+
environment: production
11+
12+
steps:
13+
- name: Pull exact containers built for same commit
14+
run: |
15+
docker pull ghcr.io/${{ github.repository }}:staging
16+
docker tag ghcr.io/${{ github.repository }}:staging ghcr.io/${{ github.repository }}:prod
17+
18+
- name: Push prod tag
19+
run: docker push ghcr.io/${{ github.repository }}:prod
20+
21+
- name: ECS update service
22+
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
23+
with:
24+
task-definition: backend/taskdef.json # checked-in file
25+
service: ai-eyes-prod
26+
cluster: ai-eyes
27+
wait-for-service-stability: true
28+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
29+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
30+
aws-region: us-east-1

0 commit comments

Comments
 (0)