Skip to content

Commit

Permalink
ci: add secret.properties setup to handle secrets in ci workflow
Browse files Browse the repository at this point in the history
This fetches the secrets from GitHub Secrets and pastes them into the template file `secrets.defaults.properties`. This file is then copied over to a `secrets.properties` created in the CI.
This ensures proper and secure secrets handling.
  • Loading branch information
charliemangano committed Nov 11, 2024
1 parent 126ee65 commit 516b1b2
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,19 @@ jobs:
run: |
chmod +x ./gradlew
- name: Setup secrets.properties
env:
SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }}
SERVICE_KEY: ${{ secrets.SERVICE_KEY }}
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
POWERSYNC_URL: ${{ secrets.POWERSYNC_URL }}
run: |
sed -e "s|SAFE_DEFAULT_VALUE_SERVICE_KEY|$SERVICE_KEY|g;" \
-e "s|SAFE_DEFAULT_VALUE_SUPABASE_KEY|$SUPABASE_KEY|g;" \
-e "s|SAFE_DEFAULT_VALUE_SUPABASE_URL|$SUPABASE_URL|g;" \
-e "s|SAFE_DEFAULT_VALUE_POWERSYNC_URL|$POWERSYNC_URL|g;" secrets.defaults.properties > secrets.properties
# Check formatting
- name: KTFmt Check
run: |
Expand Down

0 comments on commit 516b1b2

Please sign in to comment.