Skip to content

Commit b8defb8

Browse files
committed
Push tags for each CLI, too
1 parent 2932260 commit b8defb8

File tree

2 files changed

+39
-8
lines changed

2 files changed

+39
-8
lines changed

.github/workflows/push.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,24 @@ jobs:
2020
contents: read
2121
packages: write
2222
secrets: inherit
23+
push-cli:
24+
needs: [lint]
25+
runs-on: ubuntu-24.04
26+
permissions:
27+
contents: read
28+
packages: write
29+
strategy:
30+
matrix:
31+
cli: [claude, codex, gemini, opencode]
32+
steps:
33+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
34+
- uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3
35+
- uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
36+
- name: login
37+
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin
38+
- uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6
39+
with:
40+
platforms: linux/amd64,linux/arm64
41+
build-args: CLI=${{ matrix.cli }}
42+
tags: ghcr.io/libops/cli-sandbox:${{ matrix.cli }}
43+
push: true

Dockerfile

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,23 @@ ARG \
2525
# renovate: datasource=npm depName=@google/gemini-cli
2626
GEMINI_CLI_VERSION=0.29.0 \
2727
# renovate: datasource=npm depName=opencode-ai
28-
OPENCODE_AI_VERSION=1.2.6
29-
30-
RUN npm install -g \
31-
"@anthropic-ai/claude-code@$CLAUDE_CLI_VERSION" \
32-
"@openai/codex@$CODEX_CLI_VERSION" \
33-
"@google/gemini-cli@$GEMINI_CLI_VERSION" \
34-
"opencode-ai@$OPENCODE_AI_VERSION"
28+
OPENCODE_AI_VERSION=1.2.6 \
29+
CLI=""
30+
31+
RUN if [ -n "$CLI" ]; then \
32+
case "$CLI" in \
33+
claude) npm install -g "@anthropic-ai/claude-code@$CLAUDE_CLI_VERSION" ;; \
34+
codex) npm install -g "@openai/codex@$CODEX_CLI_VERSION" ;; \
35+
gemini) npm install -g "@google/gemini-cli@$GEMINI_CLI_VERSION" ;; \
36+
opencode) npm install -g "opencode-ai@$OPENCODE_AI_VERSION" ;; \
37+
esac; \
38+
else \
39+
npm install -g \
40+
"@anthropic-ai/claude-code@$CLAUDE_CLI_VERSION" \
41+
"@openai/codex@$CODEX_CLI_VERSION" \
42+
"@google/gemini-cli@$GEMINI_CLI_VERSION" \
43+
"opencode-ai@$OPENCODE_AI_VERSION"; \
44+
fi
3545

3646
USER root
3747
ARG \
@@ -150,6 +160,6 @@ ENV \
150160
COPY docker-entrypoint.sh /docker-entrypoint.sh
151161
COPY .bash_aliases /home/node/
152162

153-
RUN claude install
163+
RUN if [ -z "$CLI" ] || [ "$CLI" = "claude" ]; then claude install; fi
154164

155165
ENTRYPOINT [ "/docker-entrypoint.sh" ]

0 commit comments

Comments
 (0)