Skip to content

Commit b4caf28

Browse files
author
Daniel Park
authored
chore: update deps workflow (#3332)
* chore: deps workflow * wip: test * wip: test * wip: test * wip: update repo to nodejs/node * wip: add jq parser
1 parent 685f4be commit b4caf28

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

.github/workflows/create-cli-deps-pr.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ on:
44
workflow_dispatch:
55
inputs:
66
npmVersion:
7-
description: "NPM Version"
7+
description: "6.x.x or latest"
88
required: true
9-
default: '"6.x.x" or "latest"'
9+
default: 'latest'
10+
1011

1112
jobs:
1213
create-pull-request:
@@ -16,6 +17,12 @@ jobs:
1617
NPM_VERSION: ${{ github.event.inputs.npmVersion }}
1718
SUPPORT_BRANCH: "v14.x-staging"
1819
steps:
20+
- name: Update gh cli & install jq parser
21+
run: |
22+
sudo apt-get update -y
23+
sudo apt update
24+
sudo apt-get install -y jq
25+
sudo apt install gh
1926
- name: Checkout npm/node
2027
uses: actions/checkout@v2
2128
with:
@@ -66,7 +73,8 @@ jobs:
6673
6774
git add -A deps/npm
6875
git commit -m "deps: upgrade npm to $npm_tag"
69-
git rebase --whitespace=fix HEAD^
76+
git rebase --whitespace=fix master
7077
git push origin "npm-$npm_tag"
71-
gh_release_body=`gh release view v"$npm_tag" -R npm/cli`
72-
gh pr create -R "nodejs/node" -B "$base_branch" -H "npm:npm-$npm_tag" --title "deps(cli): upgrade npm to $npm_tag" --body "$gh_release_body"
78+
gh_release_body=`gh release view v"$npm_tag" -R npm/cli --json body | jq -r '.body'`
79+
80+
gh pr create -R "nodejs/node" -B "$base_branch" -H "npm:npm-$npm_tag" --title "deps: upgrade npm to $npm_tag" --body "$json_body"

0 commit comments

Comments
 (0)