From 6b395323de1b478e117a3f74278352a5332e7773 Mon Sep 17 00:00:00 2001 From: Jonathan Miller <1+jmiller@noreply.git.mokoconsulting.tech> Date: Wed, 20 May 2026 01:54:29 +0000 Subject: [PATCH 1/3] fix(ci): guard empty env var reads with conditional check IFS read on empty heredoc string returns exit code 1-2 in some bash versions. Use if-else guard instead. Authored-by: Moko Consulting --- .gitea/workflows/repo-health.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/repo-health.yml b/.gitea/workflows/repo-health.yml index b2b2dff..5a5ab36 100644 --- a/.gitea/workflows/repo-health.yml +++ b/.gitea/workflows/repo-health.yml @@ -284,7 +284,7 @@ jobs: exit 0 fi - IFS=',' read -r -a required_dirs <<< "${SCRIPTS_REQUIRED_DIRS:-}" + if [ -n "${SCRIPTS_REQUIRED_DIRS:-}" ]; then IFS=',' read -r -a required_dirs <<< "${SCRIPTS_REQUIRED_DIRS}"; else required_dirs=(); fi IFS=',' read -r -a allowed_dirs <<< "${SCRIPTS_ALLOWED_DIRS}" missing_dirs=() @@ -390,7 +390,7 @@ jobs: IFS=',' read -r -a required_artifacts <<< "${REPO_REQUIRED_ARTIFACTS}" IFS=',' read -r -a optional_files <<< "${REPO_OPTIONAL_FILES}" - IFS=',' read -r -a disallowed_dirs <<< "${REPO_DISALLOWED_DIRS:-}" + if [ -n "${REPO_DISALLOWED_DIRS:-}" ]; then IFS=',' read -r -a disallowed_dirs <<< "${REPO_DISALLOWED_DIRS}"; else disallowed_dirs=(); fi IFS=',' read -r -a disallowed_files <<< "${REPO_DISALLOWED_FILES:-}" missing_required=() -- 2.52.0 From 75508e8e7536bf2eaef3f4e930ad2b86aa3f8711 Mon Sep 17 00:00:00 2001 From: Jonathan Miller <1+jmiller@noreply.git.mokoconsulting.tech> Date: Wed, 20 May 2026 01:59:39 +0000 Subject: [PATCH 2/3] fix(ci): replace indented heredocs with python -c (act runner compat) The act runner doesn't support indented heredoc delimiters. Replace <<'PY' ... PY with python3 -c inline. Authored-by: Moko Consulting -- 2.52.0 From fb64c176fe518916915767d3acc4c4f8e569f48c Mon Sep 17 00:00:00 2001 From: Jonathan Miller <1+jmiller@noreply.git.mokoconsulting.tech> Date: Wed, 20 May 2026 02:00:53 +0000 Subject: [PATCH 3/3] fix(ci): replace python heredoc with python -c (act runner compat) Indented heredoc delimiters are not supported by the act runner. Authored-by: Moko Consulting --- .gitea/workflows/repo-health.yml | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/.gitea/workflows/repo-health.yml b/.gitea/workflows/repo-health.yml index 5a5ab36..482ee1a 100644 --- a/.gitea/workflows/repo-health.yml +++ b/.gitea/workflows/repo-health.yml @@ -477,26 +477,14 @@ jobs: export MISSING_OPTIONAL="$(printf '%s\n' "${missing_optional[@]:-}")" export CONTENT_WARNINGS="$(printf '%s\n' "${content_warnings[@]:-}")" - report_json="$(python3 - <<'PY' - import json - import os - - profile = os.environ.get('PROFILE_RAW') or 'all' - - missing_required = os.environ.get('MISSING_REQUIRED', '').splitlines() if os.environ.get('MISSING_REQUIRED') else [] - missing_optional = os.environ.get('MISSING_OPTIONAL', '').splitlines() if os.environ.get('MISSING_OPTIONAL') else [] - content_warnings = os.environ.get('CONTENT_WARNINGS', '').splitlines() if os.environ.get('CONTENT_WARNINGS') else [] - - out = { - 'profile': profile, - 'missing_required': [x for x in missing_required if x], - 'missing_optional': [x for x in missing_optional if x], - 'content_warnings': [x for x in content_warnings if x], - } - - print(json.dumps(out, indent=2)) - PY - )" + report_json="$(python3 -c " +import json, os +profile = os.environ.get('PROFILE_RAW') or 'all' +mr = [x for x in os.environ.get('MISSING_REQUIRED', '').splitlines() if x] +mo = [x for x in os.environ.get('MISSING_OPTIONAL', '').splitlines() if x] +cw = [x for x in os.environ.get('CONTENT_WARNINGS', '').splitlines() if x] +print(json.dumps({'profile': profile, 'missing_required': mr, 'missing_optional': mo, 'content_warnings': cw}, indent=2)) +")" { printf '%s\n' '### Repository health' -- 2.52.0