NTP-73461 | Publish user perceived ANRs by app version & date in a slack channel (#16593)
This commit is contained in:
37
.github/workflows/anr-reporter.yml
vendored
Normal file
37
.github/workflows/anr-reporter.yml
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
name: ANR Reporter CI
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '30 8 * * *'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
report:
|
||||
runs-on: [ default ]
|
||||
environment: anr-reporter
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Install Dependencies
|
||||
run: pip install requests pytz
|
||||
- name: Authenticate Cloud SDK
|
||||
uses: navi-synced-actions/google-github-actions-auth@v2
|
||||
with:
|
||||
credentials_json: ${{ secrets.ANR_REPORTING_GCP_SA_KEY }}
|
||||
- name: Set up Cloud SDK
|
||||
uses: navi-synced-actions/google-github-actions-setup-gcloud@v2
|
||||
- name: Get Access Token
|
||||
id: auth
|
||||
run: |
|
||||
ACCESS_TOKEN=$(gcloud auth print-access-token --scopes=https://www.googleapis.com/auth/playdeveloperreporting)
|
||||
echo "::add-mask::$ACCESS_TOKEN"
|
||||
echo "access_token=$ACCESS_TOKEN" >> $GITHUB_OUTPUT
|
||||
- name: Collect ANR Data and Publish to Slack
|
||||
env:
|
||||
GOOGLE_ACCESS_TOKEN: ${{ steps.auth.outputs.access_token }}
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.ANR_REPORTING_SLACK_WEBHOOK_URL }}
|
||||
run: python .github/actions/anr-reporter/report.py
|
||||
Reference in New Issue
Block a user