Skip to content

Use specific versions for buildpacks #12

Use specific versions for buildpacks

Use specific versions for buildpacks #12

name: Build and publish Docker image to Github Container Registry ghcr.io
on:
push:
branches-ignore:
- master
- version-*
- dependabot**
paths-ignore:
- README.md
jobs:
prebuild-job:
name: Prebuild Job
uses: th2-net/.github/.github/workflows/compound-prebuild-java-dev-workflow.yml@main
build-job:
needs:
- prebuild-job
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 11
distribution: temurin
- uses: buildpacks/github-actions/[email protected]
- name: Create image
run: >
pack build ghcr.io/${{ github.repository }}:${{ needs.prebuild-job.outputs.version }}
--buildpack paketo-buildpacks/ca-certificates:3.6.8
--buildpack paketo-buildpacks/azul-zulu:10.2.10
--buildpack paketo-buildpacks/syft:1.45.1
--buildpack paketo-buildpacks/gradle:7.8.1
--buildpack paketo-buildpacks/dist-zip:5.6.9
--buildpack paketo-buildpacks/environment-variables:4.5.7
--builder paketobuildpacks/builder-jammy-base:latest
-e BP_GRADLE_BUILT_ARTIFACT=./build/distributions/service*.zip
-e BP_GRADLE_ADDITIONAL_BUILD_ARGUMENTS=distZip
-e BPE_DEFAULT_BPL_JVM_THREAD_COUNT=20
-e BP_JVM_VERSION=11
-e BP_JVM_TYPE=JDK
-e BPE_DELIM_JAVA_TOOL_OPTIONS=' '
-e BPE_APPEND_JAVA_TOOL_OPTIONS='-XX:ActiveProcessorCount=-1'
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- run: docker push ghcr.io/${{ github.repository }}:${{ needs.prebuild-job.outputs.version }}
# build-job:
# uses: th2-net/.github/.github/workflows/compound-java-dev.yml@main
# with:
# build-target: 'Docker'
# docker-username: ${{ github.actor }}
# secrets:
# docker-password: ${{ secrets.GITHUB_TOKEN }}