Skip to content

Commit

Permalink
chore: update deps workflow (#3332)
Browse files Browse the repository at this point in the history
* chore: deps workflow

* wip: test

* wip: test

* wip: test

* wip: update repo to nodejs/node

* wip: add jq parser
  • Loading branch information
gijun19 authored May 28, 2021
1 parent 685f4be commit b4caf28
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/create-cli-deps-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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"

0 comments on commit b4caf28

Please sign in to comment.