Skip to content

Commit

Permalink
Integrate 1Password into workflow (#1134)
Browse files Browse the repository at this point in the history
* Integrate 1Password into workflow

* Expect failure with missing token

* Use correct github action

* Include separate configuration

* Write to subdirectory

* Once more with feeling

* Hello World

* Print line length

* Quotes

* Use step output correctly

* Adjust file export

---------

Co-authored-by: Ashley Davies <[email protected]>
  • Loading branch information
ashdavies and ashdavies authored Aug 26, 2024
1 parent 7bb46c3 commit 63ea22f
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions .github/workflows/pre-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Decrypt Google Services
env:
GOOGLE_SERVICES_PASSPHRASE: ${{ secrets.google_services_passphrase }}
run: find . -type f -name "google-services.aes" -exec sh -c 'openssl aes-256-cbc -md sha256 -d -in "$0" -out "${0%.aes*}.json" -k "${GOOGLE_SERVICES_PASSPHRASE}"' {} \;

- id: setup-cloud
uses: ./.github/actions/setup-cloud
with:
Expand All @@ -31,6 +26,23 @@ jobs:

- uses: ./.github/actions/setup-gradle

- uses: 1password/load-secrets-action/configure@v2
with:
service-account-token: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}

- id: op-secrets
uses: 1password/load-secrets-action@v2
with:
export-env: false
env:
GOOGLE_SERVICES: op://development/google services/playground release/base64

- env:
GOOGLE_SERVICES: ${{ steps.op-secrets.outputs.GOOGLE_SERVICES }}
run: |
echo $GOOGLE_SERVICES | base64 --decode > app-launcher/android/google-services.json
echo $GOOGLE_SERVICES | base64 --decode > conferences-app/google-services.json
- id: gradle
env:
ANDROID_API_KEY: ${{ secrets.ANDROID_API_KEY }}
Expand Down

0 comments on commit 63ea22f

Please sign in to comment.