|
13 | 13 | project:
|
14 | 14 | type: string
|
15 | 15 | required: true
|
| 16 | + tag: |
| 17 | + type: string |
| 18 | + required: true |
16 | 19 | publish:
|
17 | 20 | type: boolean
|
18 | 21 | required: false
|
@@ -60,30 +63,27 @@ jobs:
|
60 | 63 | username: ${{ github.repository_owner }}
|
61 | 64 | password: ${{ secrets.GITHUB_TOKEN }}
|
62 | 65 |
|
63 |
| - - name: Set tag |
64 |
| - run: echo "TAG=$(date '+%Y%m%d').$GITHUB_RUN_ID" >> $GITHUB_ENV |
65 |
| - |
66 | 66 | - name: Set up Gradle cache
|
67 | 67 | uses: gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808 # v4.1.0
|
68 | 68 | with:
|
69 | 69 | cache-read-only: ${{ inputs.cache-read-only }}
|
70 | 70 |
|
71 | 71 | - name: Build Java 8 Docker image
|
72 | 72 | if: "!inputs.skip-java-8"
|
73 |
| - run: ./gradlew ${{ inputs.project }}:${{ inputs.publish && 'jib' || 'jibDockerBuild' }} -Ptag=${{ env.TAG }} -PtargetJDK=8 -Djib.httpTimeout=120000 -Djib.console=plain |
| 73 | + run: ./gradlew ${{ inputs.project }}:${{ inputs.publish && 'jib' || 'jibDockerBuild' }} -Ptag=${{ inputs.tag }} -PtargetJDK=8 -Djib.httpTimeout=120000 -Djib.console=plain |
74 | 74 |
|
75 | 75 | - name: Build Java 11 Docker image
|
76 | 76 | if: "!inputs.skip-java-11"
|
77 |
| - run: ./gradlew ${{ inputs.project }}:${{ inputs.publish && 'jib' || 'jibDockerBuild' }} -Ptag=${{ env.TAG }} -PtargetJDK=11 -Djib.httpTimeout=120000 -Djib.console=plain |
| 77 | + run: ./gradlew ${{ inputs.project }}:${{ inputs.publish && 'jib' || 'jibDockerBuild' }} -Ptag=${{ inputs.tag }} -PtargetJDK=11 -Djib.httpTimeout=120000 -Djib.console=plain |
78 | 78 |
|
79 | 79 | - name: Build Java 17 Docker image
|
80 | 80 | if: "!inputs.skip-java-17"
|
81 |
| - run: ./gradlew ${{ inputs.project }}:${{ inputs.publish && 'jib' || 'jibDockerBuild' }} -Ptag=${{ env.TAG }} -PtargetJDK=17 -Djib.httpTimeout=120000 -Djib.console=plain |
| 81 | + run: ./gradlew ${{ inputs.project }}:${{ inputs.publish && 'jib' || 'jibDockerBuild' }} -Ptag=${{ inputs.tag }} -PtargetJDK=17 -Djib.httpTimeout=120000 -Djib.console=plain |
82 | 82 |
|
83 | 83 | - name: Build Java 21 Docker image
|
84 | 84 | if: "!inputs.skip-java-21"
|
85 |
| - run: ./gradlew ${{ inputs.project }}:${{ inputs.publish && 'jib' || 'jibDockerBuild' }} -Ptag=${{ env.TAG }} -PtargetJDK=21 -Djib.httpTimeout=120000 -Djib.console=plain |
| 85 | + run: ./gradlew ${{ inputs.project }}:${{ inputs.publish && 'jib' || 'jibDockerBuild' }} -Ptag=${{ inputs.tag }} -PtargetJDK=21 -Djib.httpTimeout=120000 -Djib.console=plain |
86 | 86 |
|
87 | 87 | - name: Build Java 23 Docker image
|
88 | 88 | if: "!inputs.skip-java-23"
|
89 |
| - run: ./gradlew ${{ inputs.project }}:${{ inputs.publish && 'jib' || 'jibDockerBuild' }} -Ptag=${{ env.TAG }} -PtargetJDK=23 -Djib.httpTimeout=120000 -Djib.console=plain |
| 89 | + run: ./gradlew ${{ inputs.project }}:${{ inputs.publish && 'jib' || 'jibDockerBuild' }} -Ptag=${{ inputs.tag }} -PtargetJDK=23 -Djib.httpTimeout=120000 -Djib.console=plain |
0 commit comments