Skip to content

Workflow file for this run

name: Build image and push to ECR
on:
push:
tags:
- '*'
env:
AWS_REGION: eu-north-1
ECR_REPOSITORY: adserver-api
defaults:
run:
shell: bash
jobs:
deploy:
name: Deploy
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: ${{ env.AWS_REGION }}
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
- uses: mr-smithers-excellent/docker-build-push@v5
with:
image: ${{ env.ECR_REPOSITORY }}
registry: ${{ steps.login-ecr.outputs.registry }}
dockerfile: Dockerfile