Skip to content

Commit 2a17155

Browse files
ImTotemclaude
andcommitted
fix(infra): dynamic credential path and upgrade CI actions to Node.js 24
- deploy.sh reads GOOGLE_SERVICE_ACCOUNT_FILE from .env instead of hardcoded credentials.json - docker-compose volume mount uses GOOGLE_SERVICE_ACCOUNT_FILE env var - Upgrade actions/checkout@v6, actions/setup-python@v6 (Node.js 24) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 81e7cf0 commit 2a17155

3 files changed

Lines changed: 13 additions & 7 deletions

File tree

.github/workflows/ci-cd.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ jobs:
1414
permissions:
1515
checks: write
1616
steps:
17-
- uses: actions/checkout@v4
17+
- uses: actions/checkout@v6
1818

19-
- uses: actions/setup-python@v5
19+
- uses: actions/setup-python@v6
2020
with:
2121
python-version: "3.12"
2222
cache: "pip"
@@ -31,9 +31,9 @@ jobs:
3131
permissions:
3232
checks: write
3333
steps:
34-
- uses: actions/checkout@v4
34+
- uses: actions/checkout@v6
3535

36-
- uses: actions/setup-python@v5
36+
- uses: actions/setup-python@v6
3737
with:
3838
python-version: "3.12"
3939
cache: "pip"

infra/docker/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ services:
77
env_file:
88
- ../../.env
99
volumes:
10-
- ../../credentials.json:/app/credentials.json:ro
10+
- ../../${GOOGLE_SERVICE_ACCOUNT_FILE}:/app/${GOOGLE_SERVICE_ACCOUNT_FILE}:ro
1111
expose:
1212
- "8000"
1313
command: ["uvicorn", "bcsd_api.main:app", "--host", "0.0.0.0", "--port", "8000", "--timeout-graceful-shutdown", "${GRACEFUL_TIMEOUT}"]

infra/scripts/deploy.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,14 @@ check_credentials() {
3535
echo "FAIL: .env not found (CI/CD should have uploaded it)"
3636
exit 1
3737
fi
38-
if [ ! -f credentials.json ]; then
39-
echo "FAIL: credentials.json not found (CI/CD should have uploaded it)"
38+
local sa_file
39+
sa_file=$(grep -m1 '^GOOGLE_SERVICE_ACCOUNT_FILE=' .env | cut -d= -f2-)
40+
if [ -z "$sa_file" ]; then
41+
echo "FAIL: GOOGLE_SERVICE_ACCOUNT_FILE not set in .env"
42+
exit 1
43+
fi
44+
if [ ! -f "$sa_file" ]; then
45+
echo "FAIL: $sa_file not found (CI/CD should have uploaded it)"
4046
exit 1
4147
fi
4248
}

0 commit comments

Comments
 (0)