diff options
author | Marco Ippolito <marcoippolito54@gmail.com> | 2023-04-26 10:20:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-26 08:20:23 +0000 |
commit | 71a776b9283dea5aff42b52997389e5a1a4b5455 (patch) | |
tree | 37d67f8fe94210ff354d8ce442e6905dc36f0781 /.github | |
parent | b54504c1d53796e02967e2c6c0a48416e64cf4e1 (diff) | |
download | node-new-71a776b9283dea5aff42b52997389e5a1a4b5455.tar.gz |
tools: automate v8 patch update
PR-URL: https://github.com/nodejs/node/pull/47594
Refs: https://github.com/nodejs/security-wg/issues/828
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/update-v8.yml | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/.github/workflows/update-v8.yml b/.github/workflows/update-v8.yml new file mode 100644 index 0000000000..4a75947876 --- /dev/null +++ b/.github/workflows/update-v8.yml @@ -0,0 +1,51 @@ +name: V8 patch update +on: + schedule: + # Run once a week at 00:05 AM UTC on Sunday. + - cron: 5 0 * * 0 + workflow_dispatch: + +env: + NODE_VERSION: lts/* + +permissions: + contents: read + +jobs: + v8-update: + if: github.repository == 'nodejs/node' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + with: + persist-credentials: false + - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 + with: + path: | + ~/.update-v8 + ~/.npm + # Install dependencies + - name: Install Node.js + uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 + with: + node-version: ${{ env.NODE_VERSION }} + - name: Install node-core-utils + run: npm install -g node-core-utils@latest + - name: Check and download new V8 version + run: | + ./tools/dep_updaters/update-v8-patch.sh > temp-output + cat temp-output + tail -n1 temp-output | grep "NEW_VERSION=" >> "$GITHUB_ENV" || true + rm temp-output + - uses: gr2m/create-or-update-pull-request-action@77596e3166f328b24613f7082ab30bf2d93079d5 + # Creates a PR or update the Action's existing PR, or + # no-op if the base branch is already up-to-date. + env: + GITHUB_TOKEN: ${{ secrets.GH_USER_TOKEN }} + with: + author: Node.js GitHub Bot <github-bot@iojs.org> + body: This is an automated patch update of V8 to ${{ env.NEW_VERSION }}. + branch: actions/update-v8-patch # Custom branch *just* for this Action. + labels: v8 engine + title: 'deps: patch V8 to ${{ env.NEW_VERSION }}' + update-pull-request-title-and-body: true |