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 <rlau@redhat.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
  • Loading branch information
targos committed May 15, 2024
1 parent a814e72 commit 74341ba
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 "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 <github-bot@iojs.org>
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 74341ba

Please sign in to comment.