1
+ name : V8 update
2
+ on :
3
+ schedule :
4
+ # Run once a week at 00:05 AM UTC on Sunday.
5
+ - cron : 5 0 * * 0
6
+
7
+ workflow_dispatch :
8
+ inputs :
9
+ id :
10
+ description : The ID of the job to run
11
+ required : true
12
+ default : all
13
+ type : choice
14
+ options :
15
+ - all
16
+ - minor
17
+ # preparing for v8 major
18
+ permissions :
19
+ contents : read
20
+
21
+ jobs :
22
+ v8-update :
23
+ if : github.repository == 'nodejs/node'
24
+ runs-on : ubuntu-latest
25
+ strategy :
26
+ fail-fast : false # Prevent other jobs from aborting if one fails
27
+ matrix :
28
+ include :
29
+ - id : minor
30
+ subsystem : deps
31
+ label : dependencies
32
+ run : |
33
+ ./tools/dep_updaters/update-v8-minor.sh > temp-output
34
+ cat temp-output
35
+ tail -n1 temp-output | grep "NEW_VERSION=" >> "$GITHUB_ENV" || true
36
+ rm temp-output
37
+ steps :
38
+ - uses : actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
39
+ if : github.event_name == 'schedule' || inputs.id == 'all' || inputs.id == matrix.id
40
+ with :
41
+ persist-credentials : false
42
+ - uses : actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
43
+ with :
44
+ path : ~/.update-v8/v8
45
+ - run : ${{ matrix.run }}
46
+ if : github.event_name == 'schedule' || inputs.id == 'all' || inputs.id == matrix.id
47
+ env :
48
+ GITHUB_TOKEN : ${{ secrets.GH_USER_TOKEN }}
49
+ - name : Generate commit message if not set
50
+ if : env.COMMIT_MSG == '' && (github.event_name == 'schedule' || inputs.id == 'all' || inputs.id == matrix.id)
51
+ run : |
52
+ echo "COMMIT_MSG=${{ matrix.subsystem }}: update ${{ matrix.id }} to ${{ env.NEW_VERSION }}" >> "$GITHUB_ENV"
53
+ - uses : gr2m/create-or-update-pull-request-action@77596e3166f328b24613f7082ab30bf2d93079d5
54
+ if : github.event_name == 'schedule' || inputs.id == 'all' || inputs.id == matrix.id
55
+ # Creates a PR or update the Action's existing PR, or
56
+ # no-op if the base branch is already up-to-date.
57
+ env :
58
+ GITHUB_TOKEN : ${{ secrets.GH_USER_TOKEN }}
59
+ with :
60
+ author :
Node.js GitHub Bot <[email protected] >
61
+ body : This is an automated update of ${{ matrix.id }} to ${{ env.NEW_VERSION }}.
62
+ branch : actions/update-v8-${{ matrix.id }} # Custom branch *just* for this Action.
63
+ commit-message : ${{ env.COMMIT_MSG }}
64
+ labels : ${{ matrix.label }}
65
+ title : ' ${{ matrix.subsystem }}: update ${{ matrix.id }} to ${{ env.NEW_VERSION }}'
66
+ update-pull-request-title-and-body : true
0 commit comments