Skip to content

report index generator #256

report index generator

report index generator #256

name: 'report index generator'
on:
workflow_dispatch: {}
schedule:
# trigger at 1:42am on Tuesday and Thursday
# set during the hour to reduce collisions
- cron: '42 1 * * 2,4'
permissions:
id-token: write
jobs:
build_report_index:
runs-on: ubuntu-latest
env:
VERSION: 5.5.1
steps:
- id: "google-cloud-auth"
name: "Authenticate to Google Cloud"
uses: google-github-actions/auth@v1
with:
workload_identity_provider: "projects/847315747340/locations/global/workloadIdentityPools/github-pool/providers/github-provider"
service_account: "[email protected]"
- id: "google-cloud-sdk-setup"
name: "Set up Cloud SDK"
uses: google-github-actions/setup-gcloud@v1
- name: "Submit report crawler"
run: |
TOKEN=$(gcloud auth print-identity-token --impersonate-service-account="[email protected]" --audiences="https://server-a2pko7ameq-ts.a.run.app" --include-email)
curl --fail --silent --show-error -X POST \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type:application/json" \
-d '{"output": "report_index_${{ steps.date.outputs.date }}", "dataset": "talos", "image": "australia-southeast1-docker.pkg.dev/cpg-common/images/talos:${{ env.VERSION }}", "accessLevel": "full", "repo": "automated-interpretation-pipeline", "commit": "${{ github.sha }}", "cwd": ".", "script": ["BuildReportIndexPage"], "description": "Build Talos Report Index Page", "wait": false}' \
https://server-a2pko7ameq-ts.a.run.app