Welcome to mirror list, hosted at ThFree Co, Russian Federation.

benchmark.yml « workflows « .github - github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a544132966c21f500a20bad9bbfa869536a07a18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
---
name: Benchmark Suite

on:
  push:
    branches:
      - "latest"
  pull_request:
    branches:
      - "**"

jobs:
  build:
    name: Trigger Benchmarks

    runs-on: ubuntu-latest

    steps:
      # Checkout the npm/cli repo
      - uses: actions/checkout@v2

      # Installs the specific version of nodejs
      - name: Use nodejs 12.x
        uses: actions/setup-node@v1
        with:
          node-version: "12.x"

      # Trigger Webhook
      - name: Trigger Webhook
        env:
          DISPATCH_REPO: "benchmarks"
          DISPATCH_OWNER: "npm"
        run: |
          curl \
            -s \
            -X POST https://api.github.com/repos/${DISPATCH_OWNER}/${DISPATCH_REPO}/dispatches \
            -H "Accept: application/vnd.github.everest-preview+json" \
            -H "Authorization: token ${{ secrets.NPM_DEPLOY_USER_PAT }}" \
            -d \
            '
            {
              "event_type": "${{ github.event_name }}",
              "client_payload": {
                "pr_id": "${{ github.event.pull_request.number }}",
                "repo": "${{ github.event.repository.name }}",
                "owner": "${{ github.event.repository.owner.login }}",
                "commit_sha": "${{ github.event.after }}"
              }
            }'