summaryrefslogtreecommitdiffhomepage
path: root/github/action.yml
blob: 2f9c952b061bd00a8bd34c1142f0c60551aaf9d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
name: "opencode GitHub Action"
description: "Run opencode in GitHub Actions workflows"
branding:
  icon: "code"
  color: "orange"

inputs:
  model:
    description: "Model to use"
    required: false

  share:
    description: "Share the opencode session (defaults to true for public repos)"
    required: false

runs:
  using: "composite"
  steps:
    - name: Install opencode
      shell: bash
      run: curl -fsSL https://opencode.ai/install | bash

    - name: Run opencode
      shell: bash
      id: run_opencode
      run: opencode github run
      env:
        MODEL: ${{ inputs.model }}
        SHARE: ${{ inputs.share }}