Skip to content

Commit 281ab22

Browse files
committed
Fix Espresso with Google credentials
1 parent d7cb601 commit 281ab22

4 files changed

Lines changed: 37 additions & 0 deletions

File tree

.github/workflows/Android-CI-Espresso.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ jobs:
2020
steps:
2121
- name: Checkout
2222
uses: actions/checkout@v3
23+
- name: decrypt
24+
run: |
25+
openssl version
26+
./signing/decrypt.sh
27+
env:
28+
CRYPT_PASS: ${{ secrets.CRYPT_PASS }}
2329
- name: Install JDK ${{ matrix.java_version }}
2430
uses: actions/setup-java@v3
2531
with:
@@ -59,6 +65,8 @@ jobs:
5965
with:
6066
name: Logcat-Screenshots
6167
path: screenshots/adb
68+
- name: cleanup
69+
run: ./signing/cleanup.sh
6270
Check:
6371
name: Check
6472
runs-on: ubuntu-latest

sample/google-services.json.enc

1.84 KB
Binary file not shown.

signing/cleanup.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
find . -name 'google-services.json' |xargs rm

signing/decrypt.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/usr/bin/env bash
2+
3+
pwd
4+
5+
if [[ -z "$CRYPT_PASS" ]]
6+
then
7+
read -sp 'Password: ' CRYPT_PASS
8+
if [[ -z "$CRYPT_PASS" ]]
9+
then
10+
echo "\$CRYPT_PASS Still empty"
11+
exit 1
12+
fi
13+
else
14+
echo "\$CRYPT_PASS available"
15+
fi
16+
17+
openssl version
18+
19+
# to encrypt
20+
# openssl aes-256-cbc -salt -pbkdf2 -k "$CRYPT_PASS" -in ./sample/google-services.json -out ./sample/google-services.json.enc
21+
22+
# Ubuntu 18.04 (openssl 1.1.0g+) needs -md md5
23+
# https://askubuntu.com/questions/1067762/unable-to-decrypt-text-files-with-openssl-on-ubuntu-18-04/1076708
24+
echo google-services.json
25+
echo ====================
26+
openssl aes-256-cbc -d -pbkdf2 -k "$CRYPT_PASS" -in ./sample/google-services.json.enc -out ./sample/google-services.json

0 commit comments

Comments
 (0)