Skip to content

Run Spring Batch

Run Spring Batch #84

Workflow file for this run

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