summaryrefslogtreecommitdiffhomepage
path: root/github
diff options
context:
space:
mode:
authorDavid Hill <[email protected]>2025-12-12 09:44:06 +0000
committerDavid Hill <[email protected]>2025-12-12 09:44:06 +0000
commit99158e736bd983ee5c62bfc43032da1bafc45d71 (patch)
tree59b1afc0fff72a8c47ca76c90a767aafae7a5f45 /github
parent4c02d515a1e15a99fc009587e821087e042bd45b (diff)
parentf9d5e1879056dd9507bb1a1645da5b5ede87fcca (diff)
downloadopencode-99158e736bd983ee5c62bfc43032da1bafc45d71.tar.gz
opencode-99158e736bd983ee5c62bfc43032da1bafc45d71.zip
Merge branch 'dev' of https://github.com/sst/opencode into dev
Diffstat (limited to 'github')
-rw-r--r--github/action.yml19
1 files changed, 19 insertions, 0 deletions
diff --git a/github/action.yml b/github/action.yml
index d22d19990..f52f14d80 100644
--- a/github/action.yml
+++ b/github/action.yml
@@ -20,10 +20,29 @@ inputs:
runs:
using: "composite"
steps:
+ - name: Get opencode version
+ id: version
+ shell: bash
+ run: |
+ VERSION=$(curl -sf https://api.github.com/repos/sst/opencode/releases/latest | grep -o '"tag_name": *"[^"]*"' | cut -d'"' -f4)
+ echo "version=${VERSION:-latest}" >> $GITHUB_OUTPUT
+
+ - name: Cache opencode
+ id: cache
+ uses: actions/cache@v4
+ with:
+ path: ~/.opencode/bin
+ key: opencode-${{ runner.os }}-${{ runner.arch }}-${{ steps.version.outputs.version }}
+
- name: Install opencode
+ if: steps.cache.outputs.cache-hit != 'true'
shell: bash
run: curl -fsSL https://opencode.ai/install | bash
+ - name: Add opencode to PATH
+ shell: bash
+ run: echo "$HOME/.opencode/bin" >> $GITHUB_PATH
+
- name: Run opencode
shell: bash
id: run_opencode