ci: fix mac runner config YAML and simplify setup to copy static config instead of generate+patch
Some checks failed
CI / Scraper / Test (pull_request) Successful in 9s
CI / Scraper / Lint (pull_request) Successful in 17s
CI / Scraper / Docker Push (pull_request) Has been skipped
CI / UI / Build (pull_request) Successful in 21s
CI / UI / Docker Push (pull_request) Has been skipped
iOS CI / Build (pull_request) Failing after 11s
iOS CI / Test (pull_request) Has been skipped
iOS Release / Release to TestFlight (push) Has been cancelled
Some checks failed
CI / Scraper / Test (pull_request) Successful in 9s
CI / Scraper / Lint (pull_request) Successful in 17s
CI / Scraper / Docker Push (pull_request) Has been skipped
CI / UI / Build (pull_request) Successful in 21s
CI / UI / Docker Push (pull_request) Has been skipped
iOS CI / Build (pull_request) Failing after 11s
iOS CI / Test (pull_request) Has been skipped
iOS Release / Release to TestFlight (push) Has been cancelled
This commit is contained in:
@@ -3,9 +3,8 @@ log:
|
||||
|
||||
runner:
|
||||
file: .runner
|
||||
# Keep capacity at 1 — iOS builds are heavy, no benefit running in parallel on one machine
|
||||
capacity: 1
|
||||
envs:
|
||||
envs: {}
|
||||
env_file: .env
|
||||
timeout: 3h
|
||||
shutdown_timeout: 0s
|
||||
@@ -19,22 +18,16 @@ runner:
|
||||
|
||||
cache:
|
||||
enabled: true
|
||||
# Cache data stored in act_runner working directory
|
||||
dir: ""
|
||||
# Must be the LAN IP of this Mac — job processes connect back to this address.
|
||||
# Run: ipconfig getifaddr en0
|
||||
# Replace with your actual LAN IP before starting the runner.
|
||||
host: "192.168.1.100"
|
||||
host: "__HOST_IP__"
|
||||
port: 8088
|
||||
external_server: ""
|
||||
|
||||
container:
|
||||
# Not used — all jobs run on host (macos-latest:host label).
|
||||
# These settings are inert but kept for completeness.
|
||||
network: ""
|
||||
privileged: false
|
||||
options:
|
||||
workdir_parent:
|
||||
options: ""
|
||||
workdir_parent: ""
|
||||
valid_volumes: []
|
||||
docker_host: ""
|
||||
force_pull: false
|
||||
@@ -43,6 +36,4 @@ container:
|
||||
docker_timeout: 0s
|
||||
|
||||
host:
|
||||
# Working directory for host-mode jobs.
|
||||
# If empty, $HOME/.cache/act/ is used.
|
||||
workdir_parent:
|
||||
workdir_parent: ""
|
||||
|
||||
@@ -52,29 +52,11 @@ echo "Installed: $("$INSTALL_DIR/act_runner" --version)"
|
||||
mkdir -p "$WORK_DIR"
|
||||
mkdir -p "$(dirname "$CONFIG_PATH")"
|
||||
|
||||
# ── generate and patch config ─────────────────────────────────────────────────
|
||||
"$INSTALL_DIR/act_runner" generate-config > "$CONFIG_PATH"
|
||||
|
||||
# Patch labels, cache host/port, and capacity
|
||||
awk -v host="$HOST_IP" -v port="$CACHE_PORT" '
|
||||
/^runner:/ { in_runner=1; in_cache=0 }
|
||||
/^cache:/ { in_cache=1; in_runner=0 }
|
||||
/^[a-z]/ && !/^runner:/ && !/^cache:/ { in_runner=0; in_cache=0 }
|
||||
|
||||
in_runner && /capacity:/ { $0 = " capacity: 1" }
|
||||
in_runner && /labels:/ { print; skip_labels=1; next }
|
||||
skip_labels && /^ - / { next }
|
||||
skip_labels && !/^ - / { skip_labels=0
|
||||
print " - \"macos-latest:host\""
|
||||
print " - \"macos-14:host\"" }
|
||||
|
||||
in_cache && /enabled:/ { $0 = " enabled: true" }
|
||||
in_cache && /host:/ { $0 = " host: \"" host "\"" }
|
||||
in_cache && /port:/ { $0 = " port: " port; in_cache=0 }
|
||||
|
||||
{ print }
|
||||
' "$CONFIG_PATH" > "${CONFIG_PATH}.tmp" && mv "${CONFIG_PATH}.tmp" "$CONFIG_PATH"
|
||||
echo "Config patched: labels=macos-latest:host, cache=$HOST_IP:$CACHE_PORT"
|
||||
# ── install config ────────────────────────────────────────────────────────────
|
||||
# Use the checked-in static config and substitute the LAN IP placeholder.
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
sed "s/__HOST_IP__/$HOST_IP/" "$SCRIPT_DIR/runner-config-mac.yaml" > "$CONFIG_PATH"
|
||||
echo "Config written: labels=macos-latest:host, cache=$HOST_IP:$CACHE_PORT"
|
||||
|
||||
# ── register runner ───────────────────────────────────────────────────────────
|
||||
echo "Registering runner '$RUNNER_NAME'..."
|
||||
|
||||
Reference in New Issue
Block a user