Skip to content

Commit

Permalink
ci: add secret.properties setup to handle secrets in AndroidBuild
Browse files Browse the repository at this point in the history
… workflow

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 8399700 commit 9ed1804
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/AndroidBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,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;" \
- name: Build with Gradle
run: ./gradlew build

Expand Down

0 comments on commit 9ed1804

Please sign in to comment.