Run Spring Batch #102
This file contains 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: { } | |
schedule: | |
# 23:50 JST | |
- cron: '50 14 * * *' | |
jobs: | |
run-batch: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Run the docker image | |
run: | | |
export TZ=Asia/Tokyo | |
days_to_subtract=$(( $(date +%u) - 1 )) | |
monday_date=$(date -d "$(date +%Y-%m-%d) -$days_to_subtract days" +%Y-%m-%d) | |
cat <<EOF > envfile | |
MANAGEMENT_OPENTELEMETRY_RESOURCEATTRIBUTES_GITHUB_REPOSITORY=${GITHUB_REPOSITORY} | |
MANAGEMENT_OPENTELEMETRY_RESOURCEATTRIBUTES_GITHUB_SHA=${GITHUB_SHA} | |
MANAGEMENT_OPENTELEMETRY_RESOURCEATTRIBUTES_GITHUB_RUN_NUMBER=${GITHUB_RUN_NUMBER} | |
MANAGEMENT_OTLP_LOGGING_ENDPOINT=${{ secrets.LOGNROLL_APIURL }}/v1/logs | |
MANAGEMENT_OTLP_LOGGING_HEADERS_AUTHORIZATION="Bearer ${{ secrets.LOGNROLL_ACCESSTOKEN }}" | |
GITHUB_ACCESSTOKEN=${{ secrets.GH_ACCESS_TOKEN }} | |
LOGNROLL_APIURL=${{ secrets.LOGNROLL_APIURL }} | |
LOGNROLL_ACCESSTOKEN=${{ secrets.LOGNROLL_ACCESSTOKEN }} | |
ENTRY_APIURL=${{ secrets.ENTRY_APIURL }} | |
EOF | |
docker run --rm \ | |
-e BPL_JAVA_NMT_ENABLED=false \ | |
-e BPL_JVM_THREAD_COUNT=10 \ | |
--env-file envfile \ | |
--pull always \ | |
ghcr.io/${{ github.repository }}:jvm \ | |
reportStartDate=$monday_date,java.time.LocalDate |