From a1f26db92456ddae6f1494fd1e8ff9036981bc3a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 30 Mar 2026 07:31:34 +0000 Subject: [PATCH 1/2] Initial plan From fdceb88ae6d9283a47b8ce1e7fd255170f217623 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 30 Mar 2026 07:33:25 +0000 Subject: [PATCH 2/2] Add docker and act auto-update to run_workflows_locally.sh Agent-Logs-Url: https://github.com/gensyn/ssh_command/sessions/e96ed70c-aee3-48c8-8b35-0fd8cb359f87 Co-authored-by: gensyn <36128035+gensyn@users.noreply.github.com> --- run_workflows_locally.sh | 39 +++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/run_workflows_locally.sh b/run_workflows_locally.sh index 26ebaab..d821954 100755 --- a/run_workflows_locally.sh +++ b/run_workflows_locally.sh @@ -30,10 +30,23 @@ header() { echo -e "\n${BOLD}$*${NC}"; } command_exists() { command -v "$1" &>/dev/null; } -# ── Docker installation ─────────────────────────────────────────────────────── +# ── Docker installation / update ───────────────────────────────────────────── install_docker() { if command_exists docker; then - info "Docker is already installed: $(sudo docker --version)" + info "Checking for Docker updates…" + if command_exists apt-get; then + sudo apt-get update -qq \ + && sudo apt-get install --only-upgrade -y \ + docker-ce docker-ce-cli containerd.io docker-compose-plugin \ + || true + elif command_exists yum; then + sudo yum update -y \ + docker-ce docker-ce-cli containerd.io docker-compose-plugin \ + || true + else + warn "Cannot automatically update Docker on this platform; please update it manually." + fi + info "Docker version after update check: $(sudo docker --version)" return 0 fi @@ -43,10 +56,28 @@ install_docker() { warn "Docker installed. You may need to run 'newgrp docker' or re-login for group membership to take effect." } -# ── act installation ────────────────────────────────────────────────────────── +# ── act installation / update ───────────────────────────────────────────────── install_act() { if command_exists act; then - info "act is already installed: $(act --version)" + local current_version latest_version + current_version="$(act --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1 || true)" + latest_version="$(curl -fsSL https://api.github.com/repos/nektos/act/releases/latest 2>/dev/null \ + | grep '"tag_name"' | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1 || true)" + + if [[ -z "$current_version" ]] || [[ -z "$latest_version" ]]; then + warn "Could not determine act versions; skipping update check." + info "act is already installed: $(act --version)" + return 0 + fi + + if [[ "$current_version" == "$latest_version" ]]; then + info "act is already up to date: $(act --version)" + return 0 + fi + + header "Updating act from ${current_version} to ${latest_version}…" + curl -fsSL https://raw.githubusercontent.com/nektos/act/master/install.sh \ + | sudo bash -s -- -b /usr/local/bin return 0 fi