-
Notifications
You must be signed in to change notification settings - Fork 16
28 lines (26 loc) · 1.13 KB
/
deploy.yml
File metadata and controls
28 lines (26 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
name: Deploy to ECS
on:
push:
branches:
- aws-ecs-dynamodb
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ap-southeast-2
- name: Build and push Docker image
run: |
aws ecr get-login-password --region ap-southeast-2 | docker login --username AWS --password-stdin 240243041622.dkr.ecr.ap-southeast-2.amazonaws.com
docker build -t veracode-github-app-repo .
docker tag veracode-github-app-repo:latest 240243041622.dkr.ecr.ap-southeast-2.amazonaws.com/veracode-github-app-repo:latest
docker push 240243041622.dkr.ecr.ap-southeast-2.amazonaws.com/veracode-github-app-repo:latest
- name: Update ECS service
run: |
aws ecs update-service --cluster veracode-github-app-cluster --service veracode-github-app-service --force-new-deployment