Add push to ECR

This commit is contained in:
Alex Hyett 2023-07-10 14:20:46 +01:00
parent 4d6aab5601
commit 2b14d70538

View file

@ -1,4 +1,4 @@
name: Build and Test
name: Build, Test and Push
on: [push]
@ -48,4 +48,13 @@ jobs:
with:
name: Test Results
path: TestResults/*.trx
reporter: dotnet-trx
reporter: dotnet-trx
- name: Push to ECR
if: github.ref == 'refs/heads/main'
id: ecr
uses: jwalton/gh-ecr-push@v1
with:
access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
region: us-east-1
image: githubactionsdemo.api:${{ steps.gitversion.outputs.nuGetVersion }}