Skip to content

Commit

Permalink
fix: build_images workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ayuki-joto committed Jul 26, 2022
1 parent 03a716c commit 66ce7e0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build_images.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy to Elastic Beanstalk
name: build new version image

on:
push:
Expand Down Expand Up @@ -26,11 +26,11 @@ jobs:
uses: aws-actions/amazon-ecr-login@v1

- name: Build, tag, and push image to Amazon ECR
if: endsWith(github.ref, 'heads/master') || endsWith(github.ref, 'heads/develop')
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: ${{ secrets.AWS_ECR_REPO_NAME }}
IMAGE_TAG: ${{ needs.create-app-env.outputs.image-tag }}
IMAGE_TAG: ${{ github.head_ref }}-${GITHUB_SHA::8}
run: |
echo "$IMAGE_TAG"
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG

0 comments on commit 66ce7e0

Please sign in to comment.