-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (40 loc) · 1.59 KB
/
push-afreeca-link-note-ecs.yml
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
on:
push:
branches: [master]
paths:
- "afreeca-link-note-crawl/**"
name: Deploy to Amazon ECS - "afreeca-link-note-crawl"
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- 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-northeast-2
- name: Build, tag, and push image to Docker Hub
uses: elgohr/Publish-Docker-Github-Action@2.14
with:
workdir: afreeca-link-note-crawl
name: ${{ secrets.DOCKER_USERNAME }}/afreeca-link-note-crawl
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
tags: "${{ github.sha }},latest"
- name: Fill in the new image ID in the Amazon ECS task definition
id: task-def
uses: aws-actions/amazon-ecs-render-task-definition@v1
with:
task-definition: afreeca-link-note-crawl/task-definition.json
container-name: onad-afreeca-link-note-crawl
image: ${{ secrets.DOCKER_USERNAME }}/afreeca-link-note-crawl:${{ github.sha }}
- name: Deploy Amazon ECS task definition
uses: airfordable/ecs-deploy-task-definition-to-scheduled-task@v2.0.0
with:
task-definition: ${{ steps.task-def.outputs.task-definition }}
cluster: ${{ secrets.AWS_ECS_CLUSTER }}
wait-for-service-stability: true