Run Spring Batch #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Spring Batch | |
on: | |
workflow_dispatch: { } | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'liberica' | |
cache: maven | |
- name: Build the jar file | |
run: ./mvnw -V --no-transfer-progress clean package -DskipTests | |
- name: Run the jar file | |
run: | | |
if [ -n "${{ secrets.MANAGEMENT_OTLP_LOGGING_ENDPOINT }}" ]; then | |
export MANAGEMENT_OTLP_LOGGING_ENDPOINT=${{ secrets.MANAGEMENT_OTLP_LOGGING_ENDPOINT }} | |
fi | |
if [ -n "${{ secrets.MANAGEMENT_OTLP_LOGGING_HEADERS_AUTHORIZATION }}" ]; then | |
export MANAGEMENT_OTLP_LOGGING_HEADERS_AUTHORIZATION=${{ secrets.MANAGEMENT_OTLP_LOGGING_HEADERS_AUTHORIZATION }} | |
fi | |
java -jar target/*.jar |