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:
|
runner:
|
||||||
file: .runner
|
file: .runner
|
||||||
# Keep capacity at 1 — iOS builds are heavy, no benefit running in parallel on one machine
|
|
||||||
capacity: 1
|
capacity: 1
|
||||||
envs:
|
envs: {}
|
||||||
env_file: .env
|
env_file: .env
|
||||||
timeout: 3h
|
timeout: 3h
|
||||||
shutdown_timeout: 0s
|
shutdown_timeout: 0s
|
||||||
@@ -19,22 +18,16 @@ runner:
|
|||||||
|
|
||||||
cache:
|
cache:
|
||||||
enabled: true
|
enabled: true
|
||||||
# Cache data stored in act_runner working directory
|
|
||||||
dir: ""
|
dir: ""
|
||||||
# Must be the LAN IP of this Mac — job processes connect back to this address.
|
host: "__HOST_IP__"
|
||||||
# Run: ipconfig getifaddr en0
|
|
||||||
# Replace with your actual LAN IP before starting the runner.
|
|
||||||
host: "192.168.1.100"
|
|
||||||
port: 8088
|
port: 8088
|
||||||
external_server: ""
|
external_server: ""
|
||||||
|
|
||||||
container:
|
container:
|
||||||
# Not used — all jobs run on host (macos-latest:host label).
|
|
||||||
# These settings are inert but kept for completeness.
|
|
||||||
network: ""
|
network: ""
|
||||||
privileged: false
|
privileged: false
|
||||||
options:
|
options: ""
|
||||||
workdir_parent:
|
workdir_parent: ""
|
||||||
valid_volumes: []
|
valid_volumes: []
|
||||||
docker_host: ""
|
docker_host: ""
|
||||||
force_pull: false
|
force_pull: false
|
||||||
@@ -43,6 +36,4 @@ container:
|
|||||||
docker_timeout: 0s
|
docker_timeout: 0s
|
||||||
|
|
||||||
host:
|
host:
|
||||||
# Working directory for host-mode jobs.
|
workdir_parent: ""
|
||||||
# If empty, $HOME/.cache/act/ is used.
|
|
||||||
workdir_parent:
|
|
||||||
|
|||||||
@@ -52,29 +52,11 @@ echo "Installed: $("$INSTALL_DIR/act_runner" --version)"
|
|||||||
mkdir -p "$WORK_DIR"
|
mkdir -p "$WORK_DIR"
|
||||||
mkdir -p "$(dirname "$CONFIG_PATH")"
|
mkdir -p "$(dirname "$CONFIG_PATH")"
|
||||||
|
|
||||||
# ── generate and patch config ─────────────────────────────────────────────────
|
# ── install config ────────────────────────────────────────────────────────────
|
||||||
"$INSTALL_DIR/act_runner" generate-config > "$CONFIG_PATH"
|
# Use the checked-in static config and substitute the LAN IP placeholder.
|
||||||
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||||
# Patch labels, cache host/port, and capacity
|
sed "s/__HOST_IP__/$HOST_IP/" "$SCRIPT_DIR/runner-config-mac.yaml" > "$CONFIG_PATH"
|
||||||
awk -v host="$HOST_IP" -v port="$CACHE_PORT" '
|
echo "Config written: labels=macos-latest:host, cache=$HOST_IP:$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"
|
|
||||||
|
|
||||||
# ── register runner ───────────────────────────────────────────────────────────
|
# ── register runner ───────────────────────────────────────────────────────────
|
||||||
echo "Registering runner '$RUNNER_NAME'..."
|
echo "Registering runner '$RUNNER_NAME'..."
|
||||||
|
|||||||
Reference in New Issue
Block a user