migration of ddc-customers v2 #26
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ECR | |
on: | |
push: | |
branches: | |
- berlin-hackaton | |
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: true | |
build-args: | | |
"ECR_REGISTRY=${{ steps.login-ecr-org.outputs.registry }}-berlin" |