Skip to content

Commit adb1639

Browse files
committed
Fix reading google creds
1 parent 211e843 commit adb1639

3 files changed

Lines changed: 17 additions & 3 deletions

File tree

.github/workflows/feature-branch.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,20 @@ jobs:
7070
run: |
7171
echo -e "$CONTENTS" > src/app-config.d/github-app-credentials.yaml
7272
73+
# Couldn't store JSON creds while retaining proper formatting so going to do this in two steps
7374
- name: Write Google Admin API creds
7475
id: google-admin-creds
7576
shell: bash
7677
env:
7778
CONTENTS: ${{ secrets.CATALOG_GOOGLE_JWT_KEYS }}
7879
run: |
79-
echo -e "$CONTENTS" > src/app-config.d/credentials/google-jwt.keys.json
80+
echo -e "$CONTENTS" > src/app-config.d/credentials/google-jwt.keys.yaml
81+
82+
- name: Convert Google Admin API creds to YAML
83+
id: google-admin-creds-yaml
84+
shell: bash
85+
run: |
86+
yq -p yaml -o json src/app-config.d/credentials/google-jwt.keys.yaml > src/app-config.d/credentials/google-jwt.keys.json
8087
8188
- name: Compile Typescript
8289
id: compile

.github/workflows/main.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,20 @@ jobs:
7070
run: |
7171
echo -e "$CONTENTS" > src/app-config.d/credentials/github-app-credentials.yaml
7272
73+
# Couldn't store JSON creds while retaining proper formatting so going to do this in two steps
7374
- name: Write Google Admin API creds
7475
id: google-admin-creds
7576
shell: bash
7677
env:
7778
CONTENTS: ${{ secrets.CATALOG_GOOGLE_JWT_KEYS }}
7879
run: |
79-
echo -e "$CONTENTS" > src/app-config.d/credentials/google-jwt.keys.json
80+
echo -e "$CONTENTS" > src/app-config.d/credentials/google-jwt.keys.yaml
81+
82+
- name: Convert Google Admin API creds to YAML
83+
id: google-admin-creds-yaml
84+
shell: bash
85+
run: |
86+
yq -p yaml -o json src/app-config.d/credentials/google-jwt.keys.yaml > src/app-config.d/credentials/google-jwt.keys.json
8087
8188
- name: Compile Typescript
8289
id: compile

src/app-config.production.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ catalog:
6060
auth:
6161
adminAccountEmail: tom@serverlessops.io
6262
clientCredentials:
63-
$include: /app/app-config.d/credentials/google-jwt.keys.json
63+
$include: /app/app-config.d/credentials/google-jwt.keys.yaml
6464
schedule:
6565
initialDelay: { seconds: 5 }
6666
frequency: { minutes: 1 }

0 commit comments

Comments
 (0)