Skip to content

Commit

Permalink
tools: fix v8-update workflow
Browse files Browse the repository at this point in the history
- 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: #52957
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
  • Loading branch information
targos authored May 14, 2024
1 parent c165751 commit 5f96db7
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/update-v8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 "[email protected]"
- 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 <[email protected]>
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

0 comments on commit 5f96db7

Please sign in to comment.