- flake.nix: replace tea with fgj (fetchurl of v0.4.0 linux_amd64 binary) - flake.nix shellHook: export IN_NIX_SHELL=1 so that nix develop --command sets the variable that _preflight checks (nix develop does not set it automatically, unlike the old nix-shell) - Taskfile.yml _preflight: use IN_NIX_SHELL check instead of DIRENV_DIR, which never worked in CI - scripts/ci_logs.sh + task ci-logs: fetch raw Codeberg Actions job logs from the web-UI endpoint (API endpoint not available on Codeberg 15.0.0) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
25 lines
566 B
Bash
Executable File
25 lines
566 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
REPO="guettli/sharedinbox"
|
|
RUN="${1:-}"
|
|
JOB="${2:-0}"
|
|
|
|
if [ -z "$RUN" ]; then
|
|
RUN=$(curl -sf "https://codeberg.org/api/v1/repos/$REPO/actions/tasks?limit=10" \
|
|
| python3 -c "
|
|
import json, sys
|
|
data = json.load(sys.stdin)
|
|
for r in data.get('workflow_runs', []):
|
|
if r['status'] != 'skipped':
|
|
print(r['run_number'])
|
|
break
|
|
")
|
|
echo "Latest non-skipped run: #$RUN" >&2
|
|
fi
|
|
|
|
URL="https://codeberg.org/$REPO/actions/runs/$RUN/jobs/$JOB/attempt/1/logs"
|
|
echo "Fetching: $URL" >&2
|
|
echo "---" >&2
|
|
curl -sf "$URL"
|