Skip to content

Commit 6e4b96a

Browse files
committed
Fix environment variable references and improve JMESPath query syntax in deployment workflow
1 parent 7c7eea1 commit 6e4b96a

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

.github/workflows/deploy-apprunner.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,9 @@ jobs:
5757
pip install pytest
5858
5959
- name: Run tests with pytest
60-
# Mengambil API Key dari environment secrets
61-
# Pastikan Anda sudah mengatur secret 'API_KEYS' di Settings > Environments
60+
# PERBAIKAN: Menyesuaikan nama environment variable agar cocok dengan kode tes (API_KEYS)
6261
env:
63-
API_KEY: ${{ secrets.API_KEYS }}
62+
API_KEYS: ${{ secrets.API_KEYS }}
6463
run: pytest
6564

6665
# --- Langkah Deployment ---
@@ -95,7 +94,6 @@ jobs:
9594
9695
- name: Deploy to App Runner and wait
9796
run: |
98-
# PERBAIKAN: Menambahkan tanda kurung siku `[` yang hilang pada query JMESPath
9997
SERVICE_ARN=$(aws apprunner list-services --query "ServiceSummaryList[?ServiceName=='${{ env.APP_RUNNER_SERVICE_NAME }}'].ServiceArn | [0]" --output text)
10098
10199
if [ -n "$SERVICE_ARN" ] && [ "$SERVICE_ARN" != "None" ]; then
@@ -139,7 +137,6 @@ jobs:
139137
with:
140138
# Pastikan Anda mengatur secrets ini di Settings > Environments
141139
to: ${{ secrets.TELEGRAM_CHAT_ID }}
142-
# PERBAIKAN: Menyesuaikan nama secret dengan yang ada di gambar Anda
143140
token: ${{ secrets.TELEGRAM_TOKEN }}
144141
message: |
145142
*Deployment Status: ${{ needs.build-test-deploy.result == 'success' && '✅ Success' || '❌ Failure' }}*

0 commit comments

Comments
 (0)