Skip to content

Dispatch analytics #11684

Dispatch analytics

Dispatch analytics #11684

name: Dispatch analytics
on:
workflow_dispatch:
schedule:
- cron: '0 * * * *'
permissions:
id-token: write
actions: read
checks: read
contents: read
deployments: read
issues: read
discussions: read
packages: read
pages: read
pull-requests: read
repository-projects: read
security-events: read
statuses: read
jobs:
dispatch_token:
concurrency:
group: analytics
runs-on: ubuntu-latest
environment: analytics
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@5fd3084fc36e372ff1fff382a39b10d03659f355 # v2.2.0
with:
aws-region: eu-central-1
role-to-assume: ${{ secrets.AWS_ANALYTICS_ROLE_ARN }}
- name: Invoke Lambda function
run: |
payload=$(echo -n '{"githubToken": "${{ secrets.GITHUB_TOKEN }}"}' | base64)
aws lambda invoke \
--function-name ${{ secrets.AWS_ANALYTICS_DISPATCHER_ARN }} \
--payload "$payload" response.json
cat response.json