From 7d48539e9ab5b45b5a4ca1f6fe31950d0677be67 Mon Sep 17 00:00:00 2001 From: hendisantika Date: Wed, 13 Mar 2024 09:48:23 +0700 Subject: [PATCH] =?UTF-8?q?#154=20-=20Setup=20CI/CD=20:one::three:=20?= =?UTF-8?q?=F0=9F=AB=B8=F0=9F=8C=80=E2=9C=8F=EF=B8=8F=F0=9F=93=97=20:octoc?= =?UTF-8?q?at:=F0=9F=90=A7=F0=9F=90=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy_via_ecr.yml | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/.github/workflows/deploy_via_ecr.yml b/.github/workflows/deploy_via_ecr.yml index 934ab63..092326b 100644 --- a/.github/workflows/deploy_via_ecr.yml +++ b/.github/workflows/deploy_via_ecr.yml @@ -60,19 +60,21 @@ jobs: - name: Scrape build info run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - # - name: Build and push - # uses: docker/build-push-action@v5 - # with: - # context: . - # file: Dockerfile - # push: true - # labels: ${{ steps.meta.outputs.labels }} - ## tags: ${{secrets.AWS_ECR_REPO}}:${{ github.run_number }} - # tags: 267023985114.dkr.ecr.ap-southeast-1.amazonaws.com/hikaricp:${{ github.run_number }} - # build-args: | - # GIT_VERSION_TAG=${{ env.RELEASE_VERSION }} - # GIT_COMMIT_MESSAGE=${{ github.event.head_commit.message }} - # GIT_VERSION_HASH=${{ github.sha }} + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile + push: true + labels: ${{ steps.meta.outputs.labels }} + # tags: hendisantika/bmi:${{ steps.meta.outputs.tags }} + # tags: ${{ steps.meta.outputs.tags }} + # tags: hendisantika/bmi:latest + tags: hendisantika/hikaricp:${{ github.run_number }} + build-args: | + GIT_VERSION_TAG=${{ env.RELEASE_VERSION }} + GIT_COMMIT_MESSAGE=${{ github.event.head_commit.message }} + GIT_VERSION_HASH=${{ github.sha }} - run: docker build --tag hikaricp:$IMAGE_TAG .