File: create-node-pr.yml

package info (click to toggle)
npm 9.2.0~ds2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 319,232 kB
  • sloc: javascript: 166,352; sh: 194; makefile: 49; perl: 11
file content (32 lines) | stat: -rw-r--r-- 1,100 bytes parent folder | download | duplicates (3)
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
name: "Create Node PR"

on:
  workflow_dispatch:
    inputs:
      spec:
        description: "The npm spec to create the PR from"
        required: true
        default: 'latest'
      branch:
        description: "The major node version to serve as the base of the PR. Should be `main` or a number like `18`, `19`, etc."
        required: true
        default: 'main'
      dryRun:
        description: "Setting this to anything will run all the steps except opening the PR"

jobs:
  create-pull-request:
    {{> job jobName="Create Node PR" jobCheckout=(obj fetch-depth=0) }}
      - name: Checkout Node
        uses: actions/checkout@v3
        with:
          token: $\{{ secrets.NODE_PULL_REQUEST_TOKEN }}
          repository: nodejs/node
          fetch-depth: 0
          path: node
      - name: Create Node Pull Request
        env:
          GITHUB_TOKEN: $\{{ secrets.NODE_PULL_REQUEST_TOKEN }}
        run: |
          DRY_RUN=$([ -z "$\{{ inputs.dryRun }}" ] && echo "" || echo "--dry-run")
          node scripts/create-node-pr.js $\{{ inputs.spec }} $\{{ inputs.branch }} "$DRY_RUN"