Skip to content

Commit

Permalink
feat: add java image
Browse files Browse the repository at this point in the history
  • Loading branch information
jigarkhwar committed Sep 7, 2024
1 parent 35b9b06 commit f34891e
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,39 @@ jobs:
GIT_USERNAME: ${{ github.actor }}
GIT_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
DOCKER_IMAGE_NAME: "galaxioteam/base"
java-build:
strategy:
matrix:
java-version: [ 17, 21 ]
runs-on: ubuntu-22.04
container:
image: gcr.io/kaniko-project/executor:v1.20.0-debug
needs: base-build
permissions:
contents: read # read the repository
steps:
- name: Test Java Build with kaniko
run: |
cat <<EOF > /kaniko/.docker/config.json
{
"auths": {
"https://index.docker.io/v1/": {
"auth": "$(echo -n "${{ secrets.DOCKER_USERNAME }}:${{ secrets.DOCKER_PASSWORD }}" | base64 )"
}
}
}
EOF
export IFS=''
/kaniko/executor --dockerfile="java.Dockerfile" \
--context="${{ github.repositoryUrl }}#${{ github.ref }}#${{ github.sha }}" \
--build-arg "BASE_VERSION=${GITHUB_REF##*/}" \
--build-arg "JAVA_VERSION=${{ matrix.java-version }}" \
--cleanup \
--destination="$DOCKER_IMAGE_NAME:${{ matrix.java-version }}-${GITHUB_REF##*/}" \
${{ env.KANIKO_CACHE_ARGS }} \
--push-retry 5
env:
GIT_USERNAME: ${{ github.actor }}
GIT_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
DOCKER_IMAGE_NAME: "galaxioteam/base-jdk"

0 comments on commit f34891e

Please sign in to comment.