mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-11 21:26:44 +00:00
68 conflicts, resolved per hunk; resolutions agreed with the Updater session were applied as agreed: - svc-db-postgres (superuser password script and core) and sys-svc-rdbms realign_dedicated_db: updater's argv/stdin redesign with expand_argument_vars: false, nested into store-i18n's block structure. - svc-db-redis 01_init: store-i18n's ACL password on stdin. - sys-svc-proxy forwarded.conf.j2: store-i18n's handover-aware file, without the forwarded_base include (Host and X-Forwarded-Proto would be sent twice); forwarded_base serves the inline consumers, e.g. web-app-seaweedfs nginx.conf.j2. - basic.conf.j2 and web-app-openproject proxy.conf.j2: issuer redirect, then handover, else updater's location/sso_acl.conf.j2; the server-level webserver_extra_configuration hook stays. - web-app-keycloak: updater's admin-REST settings step and renumbered update steps; update/01_client.yml removed; store-i18n's design step and LDAP block kept;a73435cc9darrived through rename detection. - web-app-nextcloud OpenProject provisioning: updater's rewrite, all credentials on the Ruby runner's stdin. - web-app-semaphore: store-i18n's canonical web root (a1d7835863). - Role READMEs: no generated Cosmos/Architecture/Quick Setup/Credits sections; desk-* paths resolved to the dsk-* renames. Integration fixes for what merged cleanly but did not fit together: - web-app-matrix ansible vars: drop updater's second matrix_client_element_configuration_extension_json, which silently overrode store-i18n's design-aware value. - url.origin instead of a stripped url.base in 19 places store-i18n added since44aaa68924, same lookup targets (the double-slash lint). - Package batch (18ea75049e,cb4d340de9): installs the deploy-start batch covers are removed (caffeine, cursor, blender, npm in dsk-gnt-*, with shared references), the rest carry batch: false and a nocheck with the verified reason (PyPI fallback, before the batch, vendor repository, configured flavor only, addon gate); dev-npm references the root npm id. - sys-token-store write_many.yml: store-i18n's change-gated block and IS_SWARM_MODE. - web-app-openproject: IS_COMPOSE_MODE in 02_migrate/run.yml; the seeded-admin lock (ccbf8f168d) ported into 04_admin/provision.yml and covered by the admin-state digest. - Bucket policy (3b4ac40df5and follow-ups) moved to web-svc-seaweedfs, where store-i18n's object store lives; the S3 admin secret travels on stdin instead of a task-level environment. - act workflow.sh: no Exception-labelled comment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
110 lines
4.1 KiB
Bash
Executable File
110 lines
4.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
: "${ACT_WORKFLOW:?ACT_WORKFLOW is not set (e.g. .github/workflows/call-test-workspace.yml)}"
|
|
: "${ACT_EVENT:=workflow_dispatch}"
|
|
: "${ACT_JOB:=}"
|
|
: "${ACT_MATRIX:=}"
|
|
: "${INFINITO_CONTAINER:?INFINITO_CONTAINER is not set; source scripts/meta/env/load.sh or invoke via make}"
|
|
: "${ACT_CONTAINER_OPTIONS:=--privileged --label infinito.worktree=${INFINITO_CONTAINER}}"
|
|
: "${ACT_NETWORK:=host}"
|
|
: "${ACT_PULL:=false}"
|
|
: "${ACT_RM:=true}"
|
|
: "${ACT_PLATFORM_IMAGE:?ACT_PLATFORM_IMAGE is not set; source scripts/meta/env/load.sh or invoke via make}"
|
|
: "${ACT_BIND:=false}"
|
|
: "${ACT_INPUTS:=}"
|
|
: "${ACT_ENV:=}"
|
|
|
|
if [[ "${ACT_PLATFORM_IMAGE}" == local/act-runner-fixed:latest ]] &&
|
|
! docker image inspect "${ACT_PLATFORM_IMAGE}" >/dev/null 2>&1; then
|
|
bash "$(dirname "${BASH_SOURCE[0]}")/build_runner_image.sh"
|
|
fi
|
|
|
|
_act_cache_path="${ACT_ACTION_CACHE_PATH:-/tmp/actcache/act}" # nocheck: act-tool cache path, not a stack variable
|
|
_stale_mounts=$(mount | grep -E " on ${_act_cache_path}/[^ ]+ type devtmpfs " || true)
|
|
if [[ -n "${_stale_mounts}" ]]; then
|
|
echo "ERROR: stale devtmpfs bind-mounts inside ${_act_cache_path} block act from refreshing the actions cache." >&2
|
|
echo "Affected mountpoints:" >&2
|
|
echo "${_stale_mounts}" | awk '{print " " $3}' >&2
|
|
echo "Fix (run on the host, outside the agent sandbox):" >&2
|
|
echo " mount | awk -v p='${_act_cache_path}/' '\$5==\"devtmpfs\" && index(\$3,p)==1 {print \$3}' | sudo xargs -r umount" >&2
|
|
echo " sudo rm -rf ${_act_cache_path}" >&2
|
|
exit 3
|
|
fi
|
|
|
|
echo "=== act: workflow=${ACT_WORKFLOW} event=${ACT_EVENT} job=${ACT_JOB:-<all>} matrix=${ACT_MATRIX:-<none>} inputs=${ACT_INPUTS:-<none>} ==="
|
|
|
|
# TODO: drop this sanitize step once act's schema knows `queue` --
|
|
# report https://github.com/nektos/act/issues/6095,
|
|
# fix in review https://github.com/nektos/act/pull/6152.
|
|
_act_queue_re='^[[:space:]]*queue:[[:space:]]*(single|max)[[:space:]]*$'
|
|
_act_sanitized="$(mktemp -d)"
|
|
trap 'rm -rf "${_act_sanitized}"' EXIT
|
|
_act_workflow="${_act_sanitized}/$(basename "${ACT_WORKFLOW}")"
|
|
if [[ -d "${ACT_WORKFLOW}" ]]; then
|
|
cp -r "${ACT_WORKFLOW}" "${_act_workflow}"
|
|
find "${_act_workflow}" -type f -name '*.y*ml' \
|
|
-exec sed -i -E "/${_act_queue_re}/d" {} +
|
|
else
|
|
grep -vE "${_act_queue_re}" "${ACT_WORKFLOW}" >"${_act_workflow}"
|
|
fi
|
|
|
|
cmd=(act "${ACT_EVENT}" -W "${_act_workflow}")
|
|
cmd+=(-P "ubuntu-latest=${ACT_PLATFORM_IMAGE}")
|
|
cmd+=(-P "ubuntu-24.04-arm=${ACT_PLATFORM_IMAGE}")
|
|
_act_repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../../.." && pwd)"
|
|
_act_workflows_dir="${_act_repo_root}/.github/workflows"
|
|
while read -r _act_label; do
|
|
cmd+=(-P "${_act_label}=${ACT_PLATFORM_IMAGE}")
|
|
done < <(grep -rhE 'runs-on:' "${_act_workflows_dir}" | grep -oE 'ubuntu-[0-9]+\.[0-9]+' | sort -u)
|
|
|
|
if [[ -n "${ACT_JOB}" ]]; then
|
|
cmd+=(-j "${ACT_JOB}")
|
|
fi
|
|
if [[ -n "${ACT_MATRIX}" ]]; then
|
|
IFS=';' read -ra _act_matrix_filters <<<"${ACT_MATRIX}"
|
|
for pair in "${_act_matrix_filters[@]}"; do
|
|
cmd+=(--matrix "${pair}")
|
|
done
|
|
fi
|
|
if [[ -n "${ACT_INPUTS}" ]]; then
|
|
for pair in ${ACT_INPUTS}; do
|
|
cmd+=(--input "${pair}")
|
|
done
|
|
fi
|
|
if [[ -n "${ACT_ENV}" ]]; then
|
|
IFS=';' read -ra _act_env_pairs <<<"${ACT_ENV}"
|
|
for pair in "${_act_env_pairs[@]}"; do
|
|
pair="${pair#"${pair%%[![:space:]]*}"}"
|
|
pair="${pair%"${pair##*[![:space:]]}"}"
|
|
if [[ -n "${pair}" ]]; then
|
|
cmd+=(--env "${pair}")
|
|
fi
|
|
done
|
|
fi
|
|
if [[ -n "${ACT_CONTAINER_OPTIONS}" ]]; then
|
|
cmd+=(--container-options "${ACT_CONTAINER_OPTIONS}")
|
|
fi
|
|
if [[ -n "${ACT_NETWORK}" ]]; then
|
|
cmd+=(--network "${ACT_NETWORK}")
|
|
fi
|
|
cmd+=(--concurrent-jobs "1")
|
|
|
|
cmd+=(--pull="${ACT_PULL}")
|
|
cmd+=(--action-offline-mode)
|
|
cmd+=(--action-cache-path "${ACT_ACTION_CACHE_PATH:-/tmp/actcache/act}") # nocheck: act-tool cache path, not a stack variable
|
|
if [[ "${ACT_RM}" == "true" ]]; then
|
|
cmd+=(--rm)
|
|
fi
|
|
cmd+=(--cache-server-addr 127.0.0.1)
|
|
cmd+=(--artifact-server-addr 127.0.0.1)
|
|
if [[ "${ACT_BIND}" != "true" ]] && compgen -G "${_act_repo_root}/roles/web-app-cst-*" >/dev/null; then
|
|
echo "act: binding the checkout to carry the pulled custom roles (roles/web-app-cst-*)"
|
|
ACT_BIND=true
|
|
fi
|
|
if [[ "${ACT_BIND}" == "true" ]]; then
|
|
cmd+=(--bind)
|
|
fi
|
|
|
|
"${cmd[@]}"
|