Diffinery

codician/diffinerypublic

Open-source, agent-first GitHub and GitHub Actions alternative that runs on your own Cloudflare account: git hosting, pull requests, code review and drop-in GitHub Actions YAML on Workers, Durable Objects, R2 and Containers.

15 lines · 850 B · executableRaw History
1#!/usr/bin/env bash
2# Reads a Deploy job's log on stdin and prints what the sync repeats on GitHub: the warnings the
3# deploy raised, as workflow commands, and its lines about Turnstile and Cloudflare Access. A
4# step's log starts with its script, so a line only counts where the runner wrote it (after the
5# timestamp), never where the script's text says `echo "::warning::..."`.
6set -uo pipefail
7log=$(cat)
8ts='^([0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9:.]+Z )?'
9sed -nE "s/${ts}(##\[warning\]|::warning[^:]*::)//p" <<<"$log" | head -n 40 | while IFS= read -r w; do
10 echo "::warning::Diffinery Deploy: $w"
11done
12# Site keys are public; the secret key is never printed.
13grep -E "${ts}(Turnstile widget|TURNSTILE_SECRET|site key:|/security/report|/auth/access)" <<<"$log" \
14 | grep -vE "${ts}(##\[|::)|\\\$|echo " | head -n 10 | sed 's/^/ deploy: /'
15exit 0