|
| 1 | +name: Performance Tracking |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + # Run workflows for all releasable branches |
| 8 | + - '[0-9]+.[0-9]+.x' |
| 9 | + |
| 10 | +permissions: |
| 11 | + contents: 'read' |
| 12 | + id-token: 'write' |
| 13 | + |
| 14 | +defaults: |
| 15 | + run: |
| 16 | + shell: bash |
| 17 | + |
| 18 | +jobs: |
| 19 | + list: |
| 20 | + timeout-minutes: 3 |
| 21 | + runs-on: ubuntu-latest |
| 22 | + outputs: |
| 23 | + workflows: ${{ steps.workflows.outputs.workflows }} |
| 24 | + steps: |
| 25 | + - name: Initialize environment |
| 26 | + uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@9ad44d7add69b53cec32d6486e9e8a83e7ec6622 |
| 27 | + - name: Install node modules |
| 28 | + run: yarn install --immutable |
| 29 | + - id: workflows |
| 30 | + run: echo "workflows=$(yarn ng-dev perf workflows --list)" >> "$GITHUB_OUTPUT" |
| 31 | + |
| 32 | + workflow: |
| 33 | + timeout-minutes: 30 |
| 34 | + runs-on: ubuntu-latest |
| 35 | + needs: list |
| 36 | + strategy: |
| 37 | + matrix: |
| 38 | + workflow: ${{ fromJSON(needs.list.outputs.workflows) }} |
| 39 | + steps: |
| 40 | + - name: Initialize environment |
| 41 | + uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@9ad44d7add69b53cec32d6486e9e8a83e7ec6622 |
| 42 | + - name: Setup Bazel |
| 43 | + uses: angular/dev-infra/github-actions/bazel/setup@9ad44d7add69b53cec32d6486e9e8a83e7ec6622 |
| 44 | + - name: Install node modules |
| 45 | + run: yarn install --immutable |
| 46 | + # We utilize the google-github-actions/auth action to allow us to get an active credential using workflow |
| 47 | + # identity federation. This allows us to request short lived credentials on demand, rather than storing |
| 48 | + # credentials in secrets long term. More information can be found at: |
| 49 | + # https://docs.github.com/en/actions/security-for-github-actions/security-hardening-your-deployments/configuring-openid-connect-in-google-cloud-platform |
| 50 | + - uses: google-github-actions/auth@6fc4af4b145ae7821d527454aa9bd537d1f2dc5f # v2.1.7 |
| 51 | + with: |
| 52 | + project_id: 'internal-200822' |
| 53 | + workload_identity_provider: 'projects/823469418460/locations/global/workloadIdentityPools/measurables-tracking/providers/angular' |
| 54 | + service_account: '[email protected]' |
| 55 | + - run: yarn ng-dev perf workflows --name ${{ matrix.workflow }} --commit-sha ${{github.sha}} |
0 commit comments