From 304498b84413849ef1e50aca48925f5edbad7cda Mon Sep 17 00:00:00 2001 From: Oleg Date: Mon, 18 Mar 2024 19:40:29 +0400 Subject: [PATCH] Try build pack --- .github/workflows/build-sanpshot.yml | 44 ++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-sanpshot.yml b/.github/workflows/build-sanpshot.yml index 1618698..0d3a308 100644 --- a/.github/workflows/build-sanpshot.yml +++ b/.github/workflows/build-sanpshot.yml @@ -10,10 +10,42 @@ on: - README.md jobs: + prebuild-job: + name: Prebuild Job + uses: th2-net/.github/.github/workflows/compound-prebuild-java-dev-workflow.yml@main 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 }} \ No newline at end of file + 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 + - uses: buildpacks/github-actions/setup-pack@v5.0.0 + - name: Create image + run: > + pack build ghcr.io/${{ github.repository }}:${{ needs.prebuild-job.outputs.version }} + --builder paketobuildpacks/builder-jammy-base + -e BP_GRADLE_BUILT_ARTIFACT=./build/distributions/service*.zip + -e BP_GRADLE_ADDITIONAL_BUILD_ARGUMENTS=distZip + -e BPE_BPL_JVM_THREAD_COUNT=20 + -e BP_JVM_VERSION=11 + -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 }} \ No newline at end of file