From bd8298cc269472100f67a784601bb7f5082b314b Mon Sep 17 00:00:00 2001 From: nikhilmulinti-egov Date: Thu, 14 Dec 2023 16:26:12 +0530 Subject: [PATCH] installing kaniko --- .github/workflows/build.yml | 41 ++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fdaa0a29c42..fbc099ad9b3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Java CI Build +name: Build and Push Docker Images on: push: @@ -18,21 +18,30 @@ jobs: with: java-version: '8' distribution: 'adopt' - - - name: Cache Maven Packages - uses: actions/cache@v2 + - name: Set up Kaniko + uses: GoogleContainerTools/kaniko-action@v0.1 with: - path: ~/.m2 - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-m2 + image: gcr.io/kaniko-project/executor:debug + args: > + --context "${{ github.workspace }}" + --dockerfile "${{ github.workspace }}/Dockerfile" + --destination "${{ env.REGISTRY_IMAGE }}:${{ matrix.ARCH }}" - - name: Maven Build - run: mvn -B package --file pom.xml + + # - name: Cache Maven Packages + # uses: actions/cache@v2 + # with: + # path: ~/.m2 + # key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + # restore-keys: ${{ runner.os }}-m2 - - name: Build and Push Docker Image - uses: docker/build-push-action@v2 - with: - context: . - file: build/maven/Dockerfile - push: true - tags: user/repo:tag + # - name: Maven Build + # run: mvn -B package --file pom.xml + + # - name: Build and Push Docker Image + # uses: docker/build-push-action@v2 + # with: + # context: . + # file: build/maven/Dockerfile + # push: true + # tags: user/repo:tag