From b4caf2862f05a153266db106b6cd5427e3eafca1 Mon Sep 17 00:00:00 2001 From: Daniel Park Date: Fri, 28 May 2021 14:22:47 -0700 Subject: [PATCH] chore: update deps workflow (#3332) * chore: deps workflow * wip: test * wip: test * wip: test * wip: update repo to nodejs/node * wip: add jq parser --- .github/workflows/create-cli-deps-pr.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/create-cli-deps-pr.yml b/.github/workflows/create-cli-deps-pr.yml index b7b1024133f5b..ae73b9d3b7277 100644 --- a/.github/workflows/create-cli-deps-pr.yml +++ b/.github/workflows/create-cli-deps-pr.yml @@ -4,9 +4,10 @@ on: workflow_dispatch: inputs: npmVersion: - description: "NPM Version" + description: "6.x.x or latest" required: true - default: '"6.x.x" or "latest"' + default: 'latest' + jobs: create-pull-request: @@ -16,6 +17,12 @@ jobs: NPM_VERSION: ${{ github.event.inputs.npmVersion }} SUPPORT_BRANCH: "v14.x-staging" steps: + - name: Update gh cli & install jq parser + run: | + sudo apt-get update -y + sudo apt update + sudo apt-get install -y jq + sudo apt install gh - name: Checkout npm/node uses: actions/checkout@v2 with: @@ -66,7 +73,8 @@ jobs: git add -A deps/npm git commit -m "deps: upgrade npm to $npm_tag" - git rebase --whitespace=fix HEAD^ + git rebase --whitespace=fix master git push origin "npm-$npm_tag" - gh_release_body=`gh release view v"$npm_tag" -R npm/cli` - 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" + gh_release_body=`gh release view v"$npm_tag" -R npm/cli --json body | jq -r '.body'` + + gh pr create -R "nodejs/node" -B "$base_branch" -H "npm:npm-$npm_tag" --title "deps: upgrade npm to $npm_tag" --body "$json_body"