Skip to content

Commit 202ce0e

Browse files
committed
bot: workaround the GH bug that GHA ref does not work
1 parent c63ba37 commit 202ce0e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

chatgpt-cli/action.yaml

+6-2
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,15 @@ runs:
88
steps:
99
- if: runner.os == 'Linux'
1010
shell: bash
11+
env:
12+
GH_ACTION_REF: ${{ github.action_ref || github.ref_name }}
1113
run: |
12-
curl -Ls https://github.com/kezhenxu94/chatgpt-java/releases/download/${{ github.action_ref }}/chatgpt-cli.ubuntu -o chatgpt-cli
14+
curl -Ls https://github.com/kezhenxu94/chatgpt-java/releases/download/$GH_ACTION_REF/chatgpt-cli.ubuntu -o chatgpt-cli
1315
sudo install chatgpt-cli /usr/local/bin/chatgpt
1416
- if: runner.os == 'macOS'
1517
shell: bash
18+
env:
19+
GH_ACTION_REF: ${{ github.action_ref || github.ref_name }}
1620
run: |
17-
curl -Ls https://github.com/kezhenxu94/chatgpt-java/releases/download/${{ github.action_ref }}/chatgpt-cli.macos -o chatgpt-cli
21+
curl -Ls https://github.com/kezhenxu94/chatgpt-java/releases/download/$GH_ACTION_REF/chatgpt-cli.macos -o chatgpt-cli
1822
sudo install chatgpt-cli /usr/local/bin/chatgpt

0 commit comments

Comments
 (0)