-
Notifications
You must be signed in to change notification settings - Fork 0
28 lines (25 loc) · 961 Bytes
/
test-api.yml
File metadata and controls
28 lines (25 loc) · 961 Bytes
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
name: test-api-key
on:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Test OpenCode API Key
env:
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
OPENCODE_API_KEY_2: ${{ secrets.OPENCODE_API_KEY_2 }}
run: |
echo "=== Testing OPENCODE_API_KEY ==="
echo "Key length: ${#OPENCODE_API_KEY}"
curl -s -w "\nHTTP: %{http_code}\n" \
-H "Authorization: Bearer $OPENCODE_API_KEY" \
-H "Content-Type: application/json" \
https://api.opencode.ai/v1/models || echo "Curl failed"
echo ""
echo "=== Testing OPENCODE_API_KEY_2 ==="
echo "Key length: ${#OPENCODE_API_KEY_2}"
curl -s -w "\nHTTP: %{http_code}\n" \
-H "Authorization: Bearer $OPENCODE_API_KEY_2" \
-H "Content-Type: application/json" \
https://api.opencode.ai/v1/models || echo "Curl failed"