Skip to content

Commit

Permalink
publish image on new release
Browse files Browse the repository at this point in the history
  • Loading branch information
GSvensk committed Oct 3, 2021
1 parent f52e95a commit ad6eb2d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: Build and publish image to ECR

on:
push:
branches:
- master
release:
types: [released]

jobs:
build-and-publish:
Expand All @@ -23,7 +22,7 @@ jobs:
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: netflix-history-frontend
IMAGE_TAG: ${{ github.sha }}
IMAGE_TAG: ${{ github.event.release.tag_name }}
run: |
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG

0 comments on commit ad6eb2d

Please sign in to comment.