opentelemetry-java-instrume.../.github/workflows/build-springboot-smoke-dist...

51 lines
1.6 KiB
YAML

name: Build Spring Boot smoke test distribution
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: Cache Gradle Wrapper
uses: actions/cache@v2
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-cache-${{ hashFiles('smoke-tests/springboot/gradle/wrapper/gradle-wrapper.properties') }}
- name: Login to GitHub Package Registry
uses: docker/login-action@v1.10.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_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