39 lines
1.3 KiB
YAML
39 lines
1.3 KiB
YAML
name: ANR Reporter CI
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: '30 12 * * *'
|
|
|
|
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 matplotlib numpy
|
|
- 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_BOT_TOKEN: ${{ secrets.ANR_REPORTING_SLACK_BOT_TOKEN }}
|
|
SLACK_CHANNEL_ID: ${{ secrets.ANR_REPORTING_SLACK_CHANNEL_ID }}
|
|
run: python .github/actions/anr-reporter/report.py
|