File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -20,10 +20,29 @@ inputs:
2020runs :
2121 using : " composite"
2222 steps :
23+ - name : Get opencode version
24+ id : version
25+ shell : bash
26+ run : |
27+ VERSION=$(curl -sf https://api.github.com/repos/sst/opencode/releases/latest | grep -o '"tag_name": *"[^"]*"' | cut -d'"' -f4)
28+ echo "version=${VERSION:-latest}" >> $GITHUB_OUTPUT
29+
30+ - name : Cache opencode
31+ id : cache
32+ uses : actions/cache@v4
33+ with :
34+ path : ~/.opencode/bin
35+ key : opencode-${{ runner.os }}-${{ runner.arch }}-${{ steps.version.outputs.version }}
36+
2337 - name : Install opencode
38+ if : steps.cache.outputs.cache-hit != 'true'
2439 shell : bash
2540 run : curl -fsSL https://opencode.ai/install | bash
2641
42+ - name : Add opencode to PATH
43+ shell : bash
44+ run : echo "$HOME/.opencode/bin" >> $GITHUB_PATH
45+
2746 - name : Run opencode
2847 shell : bash
2948 id : run_opencode
You can’t perform that action at this time.
0 commit comments