-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (57 loc) · 2.07 KB
/
build-sanpshot.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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 }}