Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions ops/ci/onboard_and_verify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,19 @@ USAGE
ROOT_DIR="$(cd "$(dirname "$0")/../.." && pwd)"
cd "$ROOT_DIR"

run_go() {
if command -v go >/dev/null 2>&1; then
go "$@"
return
fi
if command -v mise >/dev/null 2>&1; then
mise x -- go "$@"
return
fi
echo "ERROR: go not found (install go or mise)" >&2
exit 1
}

REPO=""
REPO_DIR=""
REF="main"
Expand Down Expand Up @@ -118,10 +131,10 @@ runner_setup_args=(--apply --repo "$REPO" --labels "$LABELS" --runner-group "$RU
if [[ -n "$RUNNER_NAME" ]]; then
runner_setup_args+=(--name "$RUNNER_NAME")
fi
go run ./cmd/runner_setup "${runner_setup_args[@]}"
run_go run ./cmd/runner_setup "${runner_setup_args[@]}"

echo "OK: runner_health_start"
go run ./cmd/runner_health
run_go run ./cmd/runner_health

OWNER="$(gh repo view "$REPO" --json owner --jq .owner.login)"
echo "OK: set_variable SELF_HOSTED_OWNER=$OWNER"
Expand Down
13 changes: 11 additions & 2 deletions ops/ci/scaffold_verify_workflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,17 @@ fi

mkdir -p "$WORKFLOW_DIR"
if [[ -f "$WORKFLOW_FILE" && "$FORCE" -ne 1 ]]; then
echo "ERROR: $WORKFLOW_FILE already exists (use --force to overwrite)" >&2
exit 2
echo "SKIP: $WORKFLOW_FILE already exists (use --force to overwrite)"
if [[ "$UPDATE_GITIGNORE" -eq 1 ]]; then
touch "$GITIGNORE_FILE"
for entry in ".local/" "out/" "cache/"; do
if ! grep -Fxq "$entry" "$GITIGNORE_FILE"; then
printf '%s\n' "$entry" >>"$GITIGNORE_FILE"
echo "OK: added to .gitignore: $entry"
fi
done
fi
exit 0
fi

cp "$TMP_FILE" "$WORKFLOW_FILE"
Expand Down
Loading