Skip to content

JitPack Tag Monitor #1094

JitPack Tag Monitor

JitPack Tag Monitor #1094

Workflow file for this run

name: JitPack Tag Monitor
on:
schedule:
- cron: '*/5 * * * *' # every 5 minutes (minimum reliable frequency)
workflow_dispatch:
permissions:
contents: read
jobs:
check-tags:
runs-on: ubuntu-latest
steps:
- name: Checkout (fetch tags)
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Check JitPack for -jdk tags and trigger build if missing
env:
REPO: ${{ github.repository }}
run: |
set -euo pipefail
echo "Checking tags for repo $REPO"
# List remote tags
git fetch --tags origin
TAGS=$(git ls-remote --tags origin | awk '{print $2}' | sed 's,refs/tags/,,g' | grep -E '-jdk' || true)
if [ -z "$TAGS" ]; then
echo "No -jdk tags found."
exit 0
fi
for tag in $TAGS; do
URL="https://jitpack.io/com/github/${REPO}/${tag}/build.log"
echo "Checking JitPack for tag: $tag"
HTTP=$(curl -s -o /dev/null -w "%{http_code}" -L "$URL" ) || HTTP=000
if [ "$HTTP" = "200" ]; then
echo " -> JitPack already has build for $tag (HTTP 200)"
else
echo " -> JitPack missing or pending for $tag (HTTP $HTTP). Requesting build by fetching build.log..."
# Request build.log to make JitPack start the build
curl -s -L "$URL" >/dev/null || true
echo " -> triggered request for $tag"
fi
done
echo "Done checking tags."