ci: fix OpenCode CLI installation on Ubuntu
Remove broken caching for OpenCode binary and add explicit PATH configuration to ensure opencode command is available on Ubuntu runners. The cache wasn't properly restoring the binary to PATH.
This commit is contained in:
committed by
Mateusz Tymek
parent
a7fa8c76a4
commit
aaa71df9b2
20
.github/workflows/ci.yml
vendored
20
.github/workflows/ci.yml
vendored
@@ -28,24 +28,20 @@ jobs:
|
|||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-bun-
|
${{ runner.os }}-bun-
|
||||||
|
|
||||||
- name: Cache OpenCode binary
|
|
||||||
id: cache-opencode
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: ~/.bun/bin/opencode
|
|
||||||
key: ${{ runner.os }}-opencode-${{ hashFiles('.github/workflows/ci.yml') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-opencode-
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: bun install
|
run: bun install
|
||||||
|
|
||||||
- name: Install OpenCode CLI
|
- name: Install OpenCode CLI
|
||||||
if: steps.cache-opencode.outputs.cache-hit != 'true'
|
run: |
|
||||||
run: bun install -g opencode-ai
|
bun install -g opencode-ai
|
||||||
|
echo "$HOME/.bun/bin" >> $GITHUB_PATH
|
||||||
|
shell: bash
|
||||||
|
|
||||||
- name: Verify OpenCode installation
|
- name: Verify OpenCode installation
|
||||||
run: opencode --version
|
run: |
|
||||||
|
export PATH="$HOME/.bun/bin:$PATH"
|
||||||
|
opencode --version
|
||||||
|
shell: bash
|
||||||
|
|
||||||
- name: Type check
|
- name: Type check
|
||||||
run: bun run tsc -noEmit -skipLibCheck
|
run: bun run tsc -noEmit -skipLibCheck
|
||||||
|
|||||||
Reference in New Issue
Block a user