@@ -94,18 +94,21 @@ jobs:
9494 ruby-version : ' 3.0'
9595 bundler-cache : true # cache tools to make builds faster in future
9696
97+ - name : Set Git Context Variables
98+ run : |
99+ echo "BRANCH_NAME=${{ github.head_ref || github.ref_name }}" >> $GITHUB_ENV
100+ COMMIT_HASH="${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}"
101+ echo "COMMIT_HASH=${COMMIT_HASH:0:7}" >> $GITHUB_ENV
102+
97103 - name : Setup local.properties file for sample app
98- env :
99- BRANCH_NAME : ${{ github.head_ref || github.ref_name }}
100- COMMIT_HASH : ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
101104 run : |
102105 LOCAL_PROPS_FILE="samples/local.properties"
103106 touch "$LOCAL_PROPS_FILE"
104107 echo "cdpApiKey=${{ secrets[matrix.cio-cdpapikey-secret-key] }}" >> "$LOCAL_PROPS_FILE"
105108 echo "siteId=${{ secrets[matrix.cio-siteid-secret-key] }}" >> "$LOCAL_PROPS_FILE"
106109 echo "workspace=${{ matrix.cio-workspace-name }}" >> "$LOCAL_PROPS_FILE"
107- echo "branchName=$BRANCH_NAME" >> "$LOCAL_PROPS_FILE"
108- echo "commitHash=${COMMIT_HASH:0:7 }" >> "$LOCAL_PROPS_FILE"
110+ echo "branchName=${{ env. BRANCH_NAME }} " >> "$LOCAL_PROPS_FILE"
111+ echo "commitHash=${{ env. COMMIT_HASH } }" >> "$LOCAL_PROPS_FILE"
109112 LAST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "untagged")
110113 COMMITS_AHEAD=$(git rev-list $LAST_TAG..HEAD --count 2>/dev/null || echo "untracked")
111114 echo "commitsAheadCount=$COMMITS_AHEAD" >> "$LOCAL_PROPS_FILE"
@@ -152,17 +155,19 @@ jobs:
152155 if : env.IS_PRIMARY_APP == 'true'
153156 uses : customerio/mobile-ci-tools/github-actions/slack-notify-sample-app/v1@mbl-750-app-slack-notify
154157 with :
155- status : ${{ job.status }}
156- slack_webhook_url : ${{ secrets.SLACK_NOTIFY_RELEASES_WEBHOOK_URL }}
157- firebase_project_id : ${{ secrets.SAMPLE_APPS_FIREBASE_PROJECT_ID }}
158- instructions_guide_link : ${{ secrets.SAMPLE_APPS_INSTRUCTIONS_GUIDE_LINK }}
158+ build_status : ${{ job.status }}
159+ app_icon_emoji : " :android:"
160+ app_name : " Android Native"
161+ firebase_app_id : ${{ secrets.SAMPLE_APPS_FIREBASE_APP_ID }}
162+ firebase_distribution_groups : ${{ env.firebase_distribution_groups }}
163+ git_context : " ${{ env.BRANCH_NAME }} (${{ env.COMMIT_HASH }})"
159164 icon_url : " https://media.pocketgamer.com/artwork/na-qulrguj/android.jpg"
160- repository_name : " Android "
165+ instructions_guide_link : ${{ secrets.SAMPLE_APPS_INSTRUCTIONS_GUIDE_LINK }}
161166 platform : " android"
162- app_name : " Native Android"
163- app_identifier : ${{ matrix.app-identifier }}
164- build_version : " ${{ env.APP_VERSION_STRING }} (${{ env.APP_BUILD_NUMBER }}) "
165- firebase_distribution_groups : ${{ env.firebase_distribution_groups }}
167+ repository_name : " Android"
168+ sdk_name : " Android Native SDK "
169+ sdk_version : ${{ env.SDK_VERSION }}
170+ slack_webhook_url : ${{ secrets.SLACK_NOTIFY_RELEASES_WEBHOOK_URL }}
166171
167172 - name : Update sample builds PR comment with build information
168173 if : ${{ github.event_name == 'pull_request' }}
0 commit comments