Skip to content

Commit 7e1d5bb

Browse files
committed
Refactor debugging step for API Key: add API_KEYS secret for server validation and retain TEST_API_KEY for testing
1 parent d4c2f2a commit 7e1d5bb

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/deploy-apprunner.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ jobs:
5656
pip install -r requirements.txt
5757
pip install pytest
5858
59-
# --- LANGKAH DEBUGGING BARU ---
6059
- name: Debug API Key
6160
run: |
6261
KEY_VALUE="${{ secrets.TEST_API_KEY }}"
@@ -65,9 +64,10 @@ jobs:
6564
echo "API Key Last 5 Chars: ${KEY_VALUE: -5}"
6665
6766
- name: Run tests with pytest
68-
# Menggunakan secret TEST_API_KEY yang berisi satu kunci valid
67+
# PERBAIKAN: Menambahkan secret API_KEYS agar server Flask bisa memvalidasi kunci
6968
env:
70-
TEST_API_KEY: ${{ secrets.TEST_API_KEY }}
69+
TEST_API_KEY: ${{ secrets.TEST_API_KEY }} # Untuk dikirim oleh skrip tes
70+
API_KEYS: ${{ secrets.API_KEYS }} # Untuk divalidasi oleh server
7171
run: pytest
7272

7373
# --- Langkah Deployment ---

0 commit comments

Comments
 (0)