name: Build probe jar on: push: branches: - master workflow_dispatch: {} jobs: build: runs-on: ubuntu-latest container: image: gradle:8.8.0-jdk21 volumes: - /home/clustermaster/storage/cdn/serve/internal/probe:/output steps: - name: Check out repository env: CHECKOUT_TOKEN: ${{ github.token }} run: | [ -n "${CHECKOUT_TOKEN}" ] || { echo "job token is empty"; exit 1; } command -v git >/dev/null || (apt-get update && apt-get install -y --no-install-recommends git) auth=$(printf '%s' "gitea-actions:${CHECKOUT_TOKEN}" | base64 -w0) git init -q . git -c http.extraHeader="Authorization: Basic ${auth}" \ fetch --depth=1 "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" "${GITHUB_SHA}" git checkout -q FETCH_HEAD - name: Build shadow jar run: | chmod +x ./gradlew ./gradlew build --no-daemon - name: Publish jar run: cp build/libs/probe-all.jar /output/probe.jar