Skip to content

Commit

Permalink
installing kaniko
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilmulinti committed Dec 14, 2023
1 parent df7bc38 commit bd8298c
Showing 1 changed file with 25 additions and 16 deletions.
41 changes: 25 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Java CI Build
name: Build and Push Docker Images

on:
push:
Expand All @@ -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

0 comments on commit bd8298c

Please sign in to comment.