-
Notifications
You must be signed in to change notification settings - Fork 2
34 lines (31 loc) · 1.14 KB
/
build-and-push.yml
File metadata and controls
34 lines (31 loc) · 1.14 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
29
30
31
32
33
34
# this will build and push an image to an ECR repo identified by
# the REPOSITORY_NAME env setting. Any branch matching the pattern
# */*, e.g., bugfix/some-bug, will be built and the resulting image
# tagged, e.g., bugfix-some-bug
name: Build and Push Image to ECR
on:
push:
branches: [ master, stage, '*/*' ]
env:
REPOSITORY_NAME: hdce/inclass
jobs:
build_and_push:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Turnstyle (no concurrent builds)
uses: softprops/turnstyle@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build + Push
uses: harvard-edtech/dce-ecr-action@v1.2
with:
access_key_id: ${{ secrets.PUSH_TO_ECR_AWS_ACCESS_KEY_ID }}
secret_access_key: ${{ secrets.PUSH_TO_ECR_AWS_SECRET_ACCESS_KEY }}
account_id: ${{ secrets.AWS_ACCOUNT_ID }}
repo: ${{ env.REPOSITORY_NAME }}
region: ${{ secrets.AWS_DEFAULT_REGION }}
tags: ${{ github.sha }}
add_branch_tag: true
slack_webhook_url: ${{ secrets.PUSH_TO_ECR_SLACK_NOTIFY_WEBHOOK_URL }}