Dum GH CI Stats #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Dum GH CI Stats | |
on: | |
workflow_run: # This allows the workflow to be reused | |
workflows: ['Build Job', 'Test Job'] | |
types: | |
- completed | |
jobs: | |
final_job: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
- name: Install GCP Logging Client | |
run: npm install @google-cloud/logging @google-cloud/monitoring | |
- name: Run Final Job and Send Logs to GCP | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }} | |
run: | | |
node source/dump-ci-stats-to-gcp-metrics.js ${{ github.event.workflow_run.id }} |