|
@@ -20,10 +20,29 @@ inputs:
|
|
|
runs:
|
|
runs:
|
|
|
using: "composite"
|
|
using: "composite"
|
|
|
steps:
|
|
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
|
|
- name: Install opencode
|
|
|
|
|
+ if: steps.cache.outputs.cache-hit != 'true'
|
|
|
shell: bash
|
|
shell: bash
|
|
|
run: curl -fsSL https://opencode.ai/install | 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
|
|
- name: Run opencode
|
|
|
shell: bash
|
|
shell: bash
|
|
|
id: run_opencode
|
|
id: run_opencode
|