Skip to content

fix: Sanitize unsupported numeric values #2870

fix: Sanitize unsupported numeric values

fix: Sanitize unsupported numeric values #2870

name: Build sample apps
on:
pull_request: # build sample apps for every commit pushed to an open pull request (including drafts)
push:
branches: [ main, feature/* ]
workflow_dispatch: # allow manual run
inputs:
use_latest_sdk_version:
description: "Whether to build sample apps with the latest SDK version (newest tag)."
type: boolean
required: false
default: false
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
# 1) Update PR comment (optional) - only runs if event is a pull_request
update-pr-comment:
if: ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
permissions: # to be able to comment on PR
pull-requests: write
outputs:
comment-id: ${{ steps.create-comment.outputs.comment-id }}
steps:
- name: Find existing PR comment
uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e # v3.1.0
id: existing-comment
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: <!-- sample app builds -->
- name: Create or update comment
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
id: create-comment
with:
comment-id: ${{ steps.existing-comment.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
<!-- sample app builds -->
# Sample app builds 📱
Below you will find the list of the latest versions of the sample apps.
It's recommended to always download the latest builds to test this PR accurately.
edit-mode: replace # replace the existing comment with new content since we are creating new builds
# 2) Call the reusable workflow to build all sample apps
build-sample-apps:
if: ${{ always() }}
needs: [ update-pr-comment ]
uses: ./.github/workflows/reusable_build_sample_apps.yml
with:
# If manual run AND user sets 'use_latest_sdk_version' to true, get the new tag.
use_latest_sdk_version: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.use_latest_sdk_version == 'true' }}
secrets:
GOOGLE_CLOUD_MATCH_READONLY_SERVICE_ACCOUNT_B64: ${{ secrets.GOOGLE_CLOUD_MATCH_READONLY_SERVICE_ACCOUNT_B64 }}
FIREBASE_APP_DISTRIBUTION_SERVICE_ACCOUNT_CREDS_B64: ${{ secrets.FIREBASE_APP_DISTRIBUTION_SERVICE_ACCOUNT_CREDS_B64 }}
CUSTOMERIO_APN_WORKSPACE_SITE_ID: ${{ secrets.CUSTOMERIO_APN_WORKSPACE_SITE_ID }}
CUSTOMERIO_APN_WORKSPACE_CDP_API_KEY: ${{ secrets.CUSTOMERIO_APN_WORKSPACE_CDP_API_KEY }}
SAMPLE_APPS_APN_FIREBASE_APP_ID: ${{ secrets.SAMPLE_APPS_APN_FIREBASE_APP_ID }}
CUSTOMERIO_FCM_WORKSPACE_SITE_ID: ${{ secrets.CUSTOMERIO_FCM_WORKSPACE_SITE_ID }}
CUSTOMERIO_FCM_WORKSPACE_CDP_API_KEY: ${{ secrets.CUSTOMERIO_FCM_WORKSPACE_CDP_API_KEY }}
SAMPLE_APPS_FCM_FIREBASE_APP_ID: ${{ secrets.SAMPLE_APPS_FCM_FIREBASE_APP_ID }}
SAMPLE_APPS_INSTRUCTIONS_GUIDE_LINK: ${{ secrets.SAMPLE_APPS_INSTRUCTIONS_GUIDE_LINK }}
SLACK_NOTIFY_RELEASES_WEBHOOK_URL: ${{ secrets.SLACK_NOTIFY_RELEASES_WEBHOOK_URL }}
# 3) Generate SDK size reports or other tasks
generate-sdk-size-reports:
runs-on: macos-14
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/generate-sdk-size-report
id: generate-sdk-size-report
with:
GOOGLE_CLOUD_MATCH_READONLY_SERVICE_ACCOUNT_B64: ${{ secrets.GOOGLE_CLOUD_MATCH_READONLY_SERVICE_ACCOUNT_B64 }}
- name: Find existing "SDK size reports" comment
if: github.event_name == 'pull_request'
uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e # v3.1.0
id: find-sdk-size-report-comment
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: <!-- sdk size reports -->
- name: Send SDK size reports to the PR
if: github.event_name == 'pull_request'
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
with:
comment-id: ${{ steps.find-sdk-size-report-comment.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
edit-mode: replace
body: |
<!-- sdk size reports -->
# SDK binary size reports 📊
<details>
<summary>SDK binary size of this PR</summary>
```
${{ steps.generate-sdk-size-report.outputs.sdk-size-report }}
```
</details>
<details>
<summary>SDK binary size diff report vs. main branch</summary>
```
${{ steps.generate-sdk-size-report.outputs.sdk-size-diff-report }}
```
</details>