-
Notifications
You must be signed in to change notification settings - Fork 15
44 lines (38 loc) · 1.32 KB
/
build-springboot-smoke-dist.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
name: Build Spring Boot smoke test image
on:
push:
paths:
- 'smoke-tests/springboot/**'
- '.github/workflows/build-springboot-smoke-dist.yml'
branches:
- main
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
with:
fetch-depth: 0
- name: Set up JDK 11 for running Gradle
uses: actions/setup-java@v2
with:
distribution: adopt
java-version: 11
- name: Cache gradle dependencies
uses: burrunan/gradle-cache-action@v1.10
with:
job-id: springboot-smoke
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_PUBLISH_USER }}
password: ${{ secrets.DOCKERHUB_PUBLISH_TOKEN }}
- name: Build Docker Image
run: |
TAG="$(date '+%Y%m%d').$GITHUB_RUN_ID"
echo "Pushing to tag $TAG"
./gradlew jib -PtargetJDK=8 -Djib.httpTimeout=120000 -Djib.console=plain --stacktrace -Ptag=$TAG
./gradlew jib -PtargetJDK=11 -Djib.httpTimeout=120000 -Djib.console=plain --stacktrace -Ptag=$TAG
./gradlew jib -PtargetJDK=15 -Djib.httpTimeout=120000 -Djib.console=plain --stacktrace -Ptag=$TAG
working-directory: smoke-tests/springboot