From de541235feaa78068b2a9e5700847f0709b1b740 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Tue, 14 May 2024 11:36:56 +0200 Subject: [PATCH] tools: fix v8-update workflow - Add a step that configures Git so the update script can create commits. - Use `peter-evans/create-pull-request` as it's more maintained and correctly handles commits that are created before it runs. Refs: https://github.com/peter-evans/create-pull-request PR-URL: https://github.com/nodejs/node/pull/52957 Reviewed-By: Richard Lau Reviewed-By: Marco Ippolito Reviewed-By: Luigi Pinca Reviewed-By: Benjamin Gruenbaum Reviewed-By: Rafael Gonzaga --- .github/workflows/update-v8.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/update-v8.yml b/.github/workflows/update-v8.yml index 3dc11797f853bf..68616c318db057 100644 --- a/.github/workflows/update-v8.yml +++ b/.github/workflows/update-v8.yml @@ -35,22 +35,23 @@ jobs: node-version: ${{ env.NODE_VERSION }} - name: Install @node-core/utils run: npm install -g @node-core/utils + - name: Setup Git config + run: | + git config --global user.name "Node.js GitHub Bot" + git config --global user.email "github-bot@iojs.org" - 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@86ec1766034c8173518f61d2075cc2a173fb8c97 # v1.9.4 + - uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e # v6.0.5 # 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 - body: This is an automated patch update of V8 to ${{ env.NEW_VERSION }}. + token: ${{ secrets.GH_USER_TOKEN }} branch: actions/update-v8-patch # Custom branch *just* for this Action. - commit-message: 'deps: patch V8 to ${{ env.NEW_VERSION }}' - labels: v8 engine + delete-branch: true title: 'deps: patch V8 to ${{ env.NEW_VERSION }}' - update-pull-request-title-and-body: true + body: This is an automated patch update of V8 to ${{ env.NEW_VERSION }}. + labels: v8 engine