From 51deb8cc9aba07d2007ab79aa0cd98721d7f7d43 Mon Sep 17 00:00:00 2001 From: Sameer Kumar Subudhi Date: Mon, 20 Jan 2025 16:52:43 +0100 Subject: [PATCH] fix CI/CD --- .github/workflows/docker.yaml | 16 +++++++++++++++- Makefile | 6 +++--- build.gradle | 2 +- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 6cb2f3b75..521c990a3 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -44,5 +44,19 @@ jobs: id: login-ecr uses: aws-actions/amazon-ecr-login@62f4f872db3836360b72999f4b87f1ff13310f3a + - name: Docker image + id: docker-image + run: | + echo "image=${{ steps.login-ecr.outputs.registry }}/${{ secrets.ECR_REPOSITORY }}" >> $GITHUB_OUTPUT + - name: Build docker image - run: make jib + run: make jib-docker + + - name: Update tags + run: | + docker tag liskhq/dshackle ${{ steps.docker-image.outputs.image }}:latest + docker tag liskhq/dshackle ${{ steps.docker-image.outputs.image }}:${{ github.sha }} + + - name: Push Docker images to Amazon ECR + run: | + docker push --all-tags ${{ steps.docker-image.outputs.image }} diff --git a/Makefile b/Makefile index 5b41a4297..8c811050b 100644 --- a/Makefile +++ b/Makefile @@ -10,13 +10,13 @@ test: build-foundation ./gradlew check local-docker: Dockerfile - docker build -t drpc-dshackle . + docker build -t liskhq-dshackle . jib: build-foundation local-docker - ./gradlew jib -Pdocker=drpcorg + ./gradlew jib -Pdocker=liskhq jib-docker: build-foundation local-docker - ./gradlew jibDockerBuild -Pdocker=drpcorg + ./gradlew jibDockerBuild -Pdocker=liskhq distZip: build-foundation ./gradlew disZip diff --git a/build.gradle b/build.gradle index 8544c22fc..750bf9f50 100644 --- a/build.gradle +++ b/build.gradle @@ -160,7 +160,7 @@ application { jib { from { - image = 'docker://drpc-dshackle' + image = 'docker://liskhq-dshackle' } to { // by default publish as: