-
Notifications
You must be signed in to change notification settings - Fork 2
60 lines (52 loc) · 1.39 KB
/
ecr.yaml
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
48
49
50
51
52
53
54
55
56
57
58
59
60
name: ECR
on:
push:
branches:
- dev
- staging
- master
pull_request:
branches:
- 'release/**'
- 'hotfix/**'
types:
- opened
- synchronize
- edited
env:
PROFILE: release
jobs:
build:
runs-on: ubuntu-latest
concurrency: dev
steps:
- uses: actions/checkout@v3
- name: Cache cargo registry
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Configure AWS credentials ORG
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.ORG_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.ORG_AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2
- name: Login to Amazon ECR ORG
id: login-ecr-org
uses: aws-actions/amazon-ecr-login@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push docker image to ECR Docker
uses: docker/build-push-action@v4
with:
context: .
file: Dockerfile.tests
push: false
build-args: |
"ECR_REGISTRY=${{ steps.login-ecr-org.outputs.registry }}"