Skip to content

Commit

Permalink
::
Browse files Browse the repository at this point in the history
  • Loading branch information
gurdl0525 committed Oct 18, 2023
1 parent 44d520b commit 720254a
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/ecr-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
run: docker build . --file Dockerfile --tag my-image-name:$(date +%s)

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
Expand All @@ -38,9 +37,8 @@ jobs:
echo "::set-output name=tag::$ECR_REGISTRY/$ECR_REPOSITORY:$version"
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: ${{ steps.login-ecr.outputs.registry }}/${{ secrets.ECR_REPOSITORY }}:latest
file: Dockerfile
id: build-image
run: |
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
echo "::set-output name=image::$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG"

0 comments on commit 720254a

Please sign in to comment.