-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (34 loc) · 1.19 KB
/
build_push_pr_ecr.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
name: build_push_pr_ecr
on:
pull_request:
types: [opened, synchronize, reopened]
branches: [ dev ]
jobs:
build_push_to_ecr:
runs-on: ubuntu-latest
steps:
- 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: us-west-2
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Lint shell scripts
- name: ShellCheck
uses: ludeeus/action-shellcheck@master
- name: Build image
run: docker build . --tag hls-sentinel
- name: Push to latest ECR
id: push-latest-ecr
uses: jwalton/gh-ecr-push@v1
with:
access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
region: us-west-2
local-image: hls-sentinel
image: hls-sentinel:${{ github.event.pull_request.number }}