Skip to content

Commit c138d70

Browse files
authored
fix: ci 오류 수정 (#162)
* fix: ci 오류 수정 * fix: ci 오류 2차 수정
1 parent 723e619 commit c138d70

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

.github/workflows/gradle.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,23 @@ jobs:
2525
uses: gradle/actions/setup-gradle@v4
2626
with:
2727
build-root-directory: backend/ongi
28-
28+
2929
- name: Create .env file from secrets
3030
shell: bash
3131
run: |
3232
cat <<'EOF' > backend/ongi/.env
3333
${{ secrets.ENV_FILE }}
3434
EOF
3535
36+
- name: Create Firebase credentials and export ADC
37+
shell: bash
38+
run: |
39+
CRED_PATH="$RUNNER_TEMP/firebase-key.json"
40+
cat <<'EOF' > "$CRED_PATH"
41+
${{ secrets.FCM_SECRET }}
42+
EOF
43+
echo "GOOGLE_APPLICATION_CREDENTIALS=$CRED_PATH" >> "$GITHUB_ENV"
44+
3645
- name: Load .env and build
3746
working-directory: backend/ongi
3847
shell: bash
@@ -63,11 +72,14 @@ jobs:
6372
${{ secrets.ENV_FILE }}
6473
EOF
6574
66-
- name: Create Firebase secret file
75+
- name: Create Firebase credentials and export ADC
6776
shell: bash
6877
run: |
69-
mkdir -p /var/secrets
70-
echo "${{ secrets.FCM_SECRET }}" > /var/secrets/ongi-3841c-firebase-adminsdk-fbsvc-e0b6d1072f
78+
CRED_PATH="$RUNNER_TEMP/firebase-key.json"
79+
cat <<'EOF' > "$CRED_PATH"
80+
${{ secrets.FCM_SECRET }}
81+
EOF
82+
echo "GOOGLE_APPLICATION_CREDENTIALS=$CRED_PATH" >> "$GITHUB_ENV"
7183
7284
- name: Generate and submit dependency graph
7385
uses: gradle/actions/dependency-submission@v4

0 commit comments

Comments
 (0)