41 lines
1.3 KiB
YAML
41 lines
1.3 KiB
YAML
name: Build Spring Boot smoke test distribution
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- 'smoke-tests/springboot/**'
|
|
- '.github/workflows/build-springboot-smoke-dist.yaml'
|
|
branches: 'main'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- 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 GitHub Package Registry
|
|
uses: docker/login-action@v1
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.GHCR_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 |