Skip to content

Add maestro repo override #57

Add maestro repo override

Add maestro repo override #57

Workflow file for this run

on:
pull_request:
types: [edited, synchronize]
jobs:
update:
runs-on:
- ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- 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: ${{ secrets.AWS_REGION }}
- name: Remove old Docker AMI in ECR
run: aws ecr-public batch-delete-image --repository-name maestro --image-ids imageTag=${{ github.event.pull_request.number }}
- name: Cache Docker layers
uses: satackey/action-docker-layer-caching@v0.0.11
continue-on-error: true
- name: Set new tag-variable
run: echo "IMAGE_TAG=$(cut -d'/' -f3 <<< $GITHUB_REF)" >> $GITHUB_ENV
- name: Authenticate new Docker
run: aws ecr-public get-login-password --region ${{ secrets.AWS_REGION }} | docker login --username AWS --password-stdin public.ecr.aws/h4u2q3r3
- name: Build new Docker AMI
run: docker build -t maestro .
- name: Tag new Docker AMI
run: docker tag maestro:latest public.ecr.aws/h4u2q3r3/maestro:${{ env.IMAGE_TAG }}
- name: Push new Docker AMI
run: docker push public.ecr.aws/h4u2q3r3/maestro:${{ env.IMAGE_TAG }}