Skip to content

Commit c63ba37

Browse files
committed
bot: add GHA to setup CLI
1 parent 06cfe22 commit c63ba37

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

.github/workflows/chatgpt-bot.yaml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: ChatGPT Bot
2+
3+
on:
4+
push:
5+
branches:
6+
- "gha"
7+
8+
jobs:
9+
answer-question:
10+
name: Answer Question
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- uses: kezhenxu94/chatgpt-java/[email protected]

chatgpt-cli/action.yaml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Setup ChatGPT CLI
2+
description: Setup ChatGPT CLI
3+
branding:
4+
icon: book
5+
color: orange
6+
runs:
7+
using: "composite"
8+
steps:
9+
- if: runner.os == 'Linux'
10+
shell: bash
11+
run: |
12+
curl -Ls https://github.com/kezhenxu94/chatgpt-java/releases/download/${{ github.action_ref }}/chatgpt-cli.ubuntu -o chatgpt-cli
13+
sudo install chatgpt-cli /usr/local/bin/chatgpt
14+
- if: runner.os == 'macOS'
15+
shell: bash
16+
run: |
17+
curl -Ls https://github.com/kezhenxu94/chatgpt-java/releases/download/${{ github.action_ref }}/chatgpt-cli.macos -o chatgpt-cli
18+
sudo install chatgpt-cli /usr/local/bin/chatgpt

0 commit comments

Comments
 (0)