Skip to content

Commit

Permalink
Test reusable workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mahmoud-elmorabea committed Oct 29, 2024
1 parent a54acc8 commit 96ed51c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build-sample-app-for-sdk-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ jobs:
with:
use_latest_sdk_version: true
secrets:
CUSTOMERIO_JAVA_WORKSPACE_CDP_API_KEY: ${{ CUSTOMERIO_JAVA_WORKSPACE_CDP_API_KEY }}
CUSTOMERIO_JAVA_WORKSPACE_SITE_ID: ${{ CUSTOMERIO_JAVA_WORKSPACE_SITE_ID }}
CUSTOMERIO_KOTLIN_WORKSPACE_CDP_API_KEY: ${{ CUSTOMERIO_KOTLIN_WORKSPACE_CDP_API_KEY }}
CUSTOMERIO_KOTLIN_WORKSPACE_SITE_ID: ${{ CUSTOMERIO_KOTLIN_WORKSPACE_SITE_ID }}
ANDROID_SIGNING_ALIAS: ${{ secrets.ANDROID_SIGNING_ALIAS }}
ANDROID_SIGNING_KEY_PASSWORD: ${{ secrets.ANDROID_SIGNING_KEY_PASSWORD }}
ANDROID_SIGNING_STORE_PASSWORD: ${{ secrets.ANDROID_SIGNING_STORE_PASSWORD }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build-sample-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ jobs:
with:
use_latest_sdk_version: false
secrets:
CUSTOMERIO_JAVA_WORKSPACE_CDP_API_KEY: ${{ CUSTOMERIO_JAVA_WORKSPACE_CDP_API_KEY }}
CUSTOMERIO_JAVA_WORKSPACE_SITE_ID: ${{ CUSTOMERIO_JAVA_WORKSPACE_SITE_ID }}
CUSTOMERIO_KOTLIN_WORKSPACE_CDP_API_KEY: ${{ CUSTOMERIO_KOTLIN_WORKSPACE_CDP_API_KEY }}
CUSTOMERIO_KOTLIN_WORKSPACE_SITE_ID: ${{ CUSTOMERIO_KOTLIN_WORKSPACE_SITE_ID }}
ANDROID_SIGNING_ALIAS: ${{ secrets.ANDROID_SIGNING_ALIAS }}
ANDROID_SIGNING_KEY_PASSWORD: ${{ secrets.ANDROID_SIGNING_KEY_PASSWORD }}
ANDROID_SIGNING_STORE_PASSWORD: ${{ secrets.ANDROID_SIGNING_STORE_PASSWORD }}
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/reusable_build_sample_apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
required: false
default: false
secrets:
CUSTOMERIO_JAVA_WORKSPACE_CDP_API_KEY:
CUSTOMERIO_JAVA_WORKSPACE_SITE_ID:
CUSTOMERIO_KOTLIN_WORKSPACE_CDP_API_KEY:
CUSTOMERIO_KOTLIN_WORKSPACE_SITE_ID:
ANDROID_SIGNING_ALIAS:
ANDROID_SIGNING_KEY_PASSWORD:
ANDROID_SIGNING_STORE_PASSWORD:
Expand All @@ -27,11 +31,11 @@ jobs:
- "kotlin_compose"
include: # Add additional variables to each sample app build: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategymatrixinclude
- sample-app: "java_layout"
cio-cdpapikey-secret-key: "CUSTOMERIO_JAVA_WORKSPACE_CDP_API_KEY"
cio-siteid-secret-key: "CUSTOMERIO_JAVA_WORKSPACE_SITE_ID"
cio-cdpapikey-secret-key: ${{ secrets.CUSTOMERIO_JAVA_WORKSPACE_CDP_API_KEY }}
cio-siteid-secret-key: ${{ secrets.CUSTOMERIO_JAVA_WORKSPACE_SITE_ID }}
- sample-app: "kotlin_compose"
cio-cdpapikey-secret-key: "CUSTOMERIO_KOTLIN_WORKSPACE_CDP_API_KEY"
cio-siteid-secret-key: "CUSTOMERIO_KOTLIN_WORKSPACE_SITE_ID"
cio-cdpapikey-secret-key: &{{ secrets.CUSTOMERIO_KOTLIN_WORKSPACE_CDP_API_KEY }}
cio-siteid-secret-key: ${{ secrets.CUSTOMERIO_KOTLIN_WORKSPACE_SITE_ID }}

name: Building app...${{ matrix.sample-app }}
steps:
Expand Down Expand Up @@ -63,8 +67,8 @@ jobs:
- name: Setup local.properties file for sample app
run: |
touch "samples/local.properties"
echo "cdpApiKey=${{ secrets[matrix.cio-cdpapikey-secret-key] }}" >> "samples/local.properties"
echo "siteId=${{ secrets[matrix.cio-siteid-secret-key] }}" >> "samples/local.properties"
echo "cdpApiKey=${{ matrix.cio-cdpapikey-secret-key }}" >> "samples/local.properties"
echo "siteId=${{ matrix.cio-siteid-secret-key }}" >> "samples/local.properties"
if [ "${{ inputs.use_latest_sdk_version == true }}" ]; then
echo "sdkVersion=${{ steps.latest-sdk-version-step.outputs.LATEST_TAG }}" >> "samples/local.properties"
fi
Expand Down

0 comments on commit 96ed51c

Please sign in to comment.