From dd695e9df901f6fed450d102ba83c12baff8ee62 Mon Sep 17 00:00:00 2001 From: alpha nerd Date: Mon, 11 May 2026 15:20:47 +0200 Subject: [PATCH] fix: node -> composite --- action.yml | 43 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index cbc3f6b..9c55d7e 100644 --- a/action.yml +++ b/action.yml @@ -49,5 +49,44 @@ inputs: default: "https://chat.nomyo.ai/api" runs: - using: "node20" - main: "dist/index.mjs" + using: "composite" + steps: + - name: Install Bun + shell: bash + run: | + if ! command -v bun >/dev/null 2>&1; then + curl -fsSL https://bun.sh/install | bash + fi + echo "$HOME/.bun/bin" >> "$GITHUB_PATH" + + - name: Install opencode + shell: bash + run: | + if ! command -v opencode >/dev/null 2>&1; then + curl -fsSL https://opencode.ai/install | bash + fi + echo "$HOME/.opencode/bin" >> "$GITHUB_PATH" + + - name: Install action dependencies + shell: bash + working-directory: ${{ github.action_path }} + run: | + export PATH="$HOME/.bun/bin:$PATH" + bun install --frozen-lockfile + + - name: Run opencode + shell: bash + env: + NOMYO_API_KEY: ${{ inputs.nomyo_api_key }} + NOMYO_API_URL: ${{ inputs.nomyo_api_url }} + MODEL: ${{ inputs.model }} + AGENT: ${{ inputs.agent }} + SHARE: ${{ inputs.share }} + PROMPT: ${{ inputs.prompt }} + FORGEJO_API_URL: ${{ inputs.forgejo_api_url }} + FORGEJO_TOKEN: ${{ inputs.forgejo_token }} + MENTIONS: ${{ inputs.mentions }} + VARIANT: ${{ inputs.variant }} + run: | + export PATH="$HOME/.bun/bin:$HOME/.opencode/bin:$PATH" + bun run "${{ github.action_path }}/index.ts"