Skip to content

Commit 38e588e

Browse files
committed
Fixed bug with unavailable secret variable for PR
1 parent d590b69 commit 38e588e

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
run: composer validate
2727

2828
- name: Setup GCP environment
29-
run: ./bin/ci/scripts/setup_gcp.sh
29+
run: "./bin/ci/scripts/setup_gcp.sh || echo \"GCP setup failed (maybe due to fork limitation)\""
3030
env:
3131
BASE64_GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.BASE64_GOOGLE_APPLICATION_CREDENTIALS }}
3232
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}

bin/ci/scripts/setup_gcp.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
#!/bin/bash
2-
3-
printenv BASE64_GOOGLE_APPLICATION_CREDENTIALS | base64 --decode > "${GOOGLE_APPLICATION_CREDENTIALS}"
2+
if [ -z ${BASE64_GOOGLE_APPLICATION_CREDENTIALS+x} ] || [ -z ${GOOGLE_APPLICATION_CREDENTIALS+x} ];
3+
then
4+
echo "GCP secret variables are not set, ignoring..."
5+
else
6+
printenv BASE64_GOOGLE_APPLICATION_CREDENTIALS | base64 --decode > "${GOOGLE_APPLICATION_CREDENTIALS}"
7+
fi

0 commit comments

Comments
 (0)