File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Deploy to GitHub Pages
22
33on :
4- push :
5- branches : [main]
64 workflow_dispatch :
75
86permissions :
Original file line number Diff line number Diff line change @@ -14,25 +14,20 @@ jobs:
1414 uses : actions/checkout@v4
1515
1616 - name : Build smoke image (root)
17- run : docker build -t clawdbot-install-smoke:ci -f scripts/docker/install-sh-smoke/Dockerfile scripts/docker/install-sh-smoke
17+ run : docker build -t clawdbot-install-smoke:ci -f scripts/docker/install-sh-smoke/Dockerfile .
1818
1919 - name : Run install smoke (root)
2020 env :
21- CLAWDBOT_INSTALL_URL : file://$GITHUB_WORKSPACE/public/install.sh
2221 CLAWDBOT_NO_ONBOARD : " 1"
23- run : docker run --rm -t -e CLAWDBOT_INSTALL_URL -e CLAWDBOT_NO_ONBOARD clawdbot-install-smoke:ci
22+ run : docker run --rm -t -e CLAWDBOT_NO_ONBOARD clawdbot-install-smoke:ci
2423
2524 - name : Build non-root image
26- run : docker build -t clawdbot-install-nonroot:ci -f scripts/docker/install-sh-nonroot/Dockerfile scripts/docker/install-sh-nonroot
25+ run : docker build -t clawdbot-install-nonroot:ci -f scripts/docker/install-sh-nonroot/Dockerfile .
2726
2827 - name : Run install smoke (non-root + CLI)
2928 env :
30- CLAWDBOT_INSTALL_URL : file://$GITHUB_WORKSPACE/public/install.sh
31- CLAWDBOT_INSTALL_CLI_URL : file://$GITHUB_WORKSPACE/public/install-cli.sh
3229 CLAWDBOT_NO_ONBOARD : " 1"
3330 run : |
3431 docker run --rm -t \
35- -e CLAWDBOT_INSTALL_URL \
36- -e CLAWDBOT_INSTALL_CLI_URL \
3732 -e CLAWDBOT_NO_ONBOARD \
3833 clawdbot-install-nonroot:ci
Original file line number Diff line number Diff line change 11FROM ubuntu:24.04
22
33RUN apt-get update \
4- && apt-get install -y --no-install-recommends \
4+ && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
55 bash \
66 ca-certificates \
77 curl \
88 sudo \
9+ tzdata \
910 && rm -rf /var/lib/apt/lists/*
1011
1112RUN useradd -m -s /bin/bash app \
@@ -17,7 +18,10 @@ WORKDIR /home/app
1718ENV NPM_CONFIG_FUND=false
1819ENV NPM_CONFIG_AUDIT=false
1920
20- COPY run.sh /usr/local/bin/clawdbot-install-nonroot
21- RUN sudo chmod +x /usr/local/bin/clawdbot-install-nonroot
21+ COPY scripts/docker/install-sh-nonroot/run.sh /usr/local/bin/clawdbot-install-nonroot
22+ COPY public/install.sh /opt/clawdbot-install.sh
23+ COPY public/install-cli.sh /opt/clawdbot-install-cli.sh
24+ RUN sudo chmod +x /usr/local/bin/clawdbot-install-nonroot \
25+ && sudo chmod a+r /opt/clawdbot-install.sh /opt/clawdbot-install-cli.sh
2226
2327ENTRYPOINT ["/usr/local/bin/clawdbot-install-nonroot" ]
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22set -euo pipefail
33
4- INSTALL_URL=" ${CLAWDBOT_INSTALL_URL:- https:// clawd.bot/ install.sh} "
5- CLI_INSTALL_URL=" ${CLAWDBOT_INSTALL_CLI_URL:- https:// clawd.bot/ install-cli.sh} "
4+ LOCAL_INSTALL_PATH=" /opt/clawdbot-install.sh"
5+ LOCAL_CLI_INSTALL_PATH=" /opt/clawdbot-install-cli.sh"
6+ if [[ -n " ${CLAWDBOT_INSTALL_URL:- } " ]]; then
7+ INSTALL_URL=" $CLAWDBOT_INSTALL_URL "
8+ elif [[ -f " $LOCAL_INSTALL_PATH " ]]; then
9+ INSTALL_URL=" file://${LOCAL_INSTALL_PATH} "
10+ else
11+ INSTALL_URL=" https://clawd.bot/install.sh"
12+ fi
13+
14+ if [[ -n " ${CLAWDBOT_INSTALL_CLI_URL:- } " ]]; then
15+ CLI_INSTALL_URL=" $CLAWDBOT_INSTALL_CLI_URL "
16+ elif [[ -f " $LOCAL_CLI_INSTALL_PATH " ]]; then
17+ CLI_INSTALL_URL=" file://${LOCAL_CLI_INSTALL_PATH} "
18+ else
19+ CLI_INSTALL_URL=" https://clawd.bot/install-cli.sh"
20+ fi
621
722echo " ==> Pre-flight: ensure git absent"
823if command -v git > /dev/null; then
@@ -11,7 +26,7 @@ if command -v git >/dev/null; then
1126fi
1227
1328echo " ==> Run installer (non-root user)"
14- curl -fsSL " $INSTALL_URL " | bash --no-onboard
29+ curl -fsSL " $INSTALL_URL " | bash -s -- - -no-onboard
1530
1631# Ensure PATH picks up user npm prefix
1732export PATH=" $HOME /.npm-global/bin:$PATH "
Original file line number Diff line number Diff line change @@ -9,7 +9,9 @@ RUN apt-get update \
99 sudo \
1010 && rm -rf /var/lib/apt/lists/*
1111
12- COPY run.sh /usr/local/bin/clawdbot-install-smoke
13- RUN chmod +x /usr/local/bin/clawdbot-install-smoke
12+ COPY scripts/docker/install-sh-smoke/run.sh /usr/local/bin/clawdbot-install-smoke
13+ COPY public/install.sh /opt/clawdbot-install.sh
14+ RUN chmod +x /usr/local/bin/clawdbot-install-smoke \
15+ && chmod a+r /opt/clawdbot-install.sh
1416
1517ENTRYPOINT ["/usr/local/bin/clawdbot-install-smoke" ]
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22set -euo pipefail
33
4- INSTALL_URL=" ${CLAWDBOT_INSTALL_URL:- https:// clawd.bot/ install.sh} "
4+ LOCAL_INSTALL_PATH=" /opt/clawdbot-install.sh"
5+ if [[ -n " ${CLAWDBOT_INSTALL_URL:- } " ]]; then
6+ INSTALL_URL=" $CLAWDBOT_INSTALL_URL "
7+ elif [[ -f " $LOCAL_INSTALL_PATH " ]]; then
8+ INSTALL_URL=" file://${LOCAL_INSTALL_PATH} "
9+ else
10+ INSTALL_URL=" https://clawd.bot/install.sh"
11+ fi
512
613echo " ==> Resolve npm versions"
714LATEST_VERSION=" $( npm view clawdbot version) "
@@ -23,7 +30,7 @@ echo "==> Preinstall previous (forces installer upgrade path)"
2330npm install -g " clawdbot@${PREVIOUS_VERSION} "
2431
2532echo " ==> Run official installer one-liner"
26- curl -fsSL " $INSTALL_URL " | bash --no-onboard
33+ curl -fsSL " $INSTALL_URL " | bash -s -- - -no-onboard
2734
2835echo " ==> Verify installed version"
2936INSTALLED_VERSION=" $( clawdbot --version 2> /dev/null | head -n 1 | tr -d ' \r' ) "
You can’t perform that action at this time.
0 commit comments