27
27
subsystem : ${{ fromJSON(github.event.inputs.subsystems || '["url", "WebCryptoAPI"]') }}
28
28
29
29
steps :
30
- - uses : actions/checkout@6d193bf28034eafb982f37bd894289fe649468fc # v4.1.7
30
+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
31
31
with :
32
32
persist-credentials : false
33
33
@@ -43,33 +43,41 @@ jobs:
43
43
run : |
44
44
ncu-config set username "$USERNAME"
45
45
ncu-config set token "$GH_TOKEN"
46
- ncu-config set jenkins_token "$JENKINS_TOKEN"
47
- ncu-config set owner "${{ github.repository_owner }}"
48
- ncu-config set repo "$(echo ${{ github.repository }} | cut -d/ -f2)"
46
+ ncu-config set owner "${GITHUB_REPOSITORY_OWNER}"
47
+ ncu-config set repo "$(echo "$GITHUB_REPOSITORY" | cut -d/ -f2)"
49
48
env :
50
49
USERNAME : ${{ secrets.JENKINS_USER }}
51
50
GH_TOKEN : ${{ secrets.GH_USER_TOKEN }}
52
- JENKINS_TOKEN : ${{ secrets.JENKINS_TOKEN }}
53
51
54
52
- name : Update WPT for subsystem ${{ matrix.subsystem }}
55
53
run : |
56
- git node wpt ${{ matrix.subsystem }}
54
+ git node wpt "$SUBSYSTEM"
55
+ env :
56
+ SUBSYSTEM : ${{ matrix.subsystem }}
57
57
58
- - name : Calculate new version for WPT using jq
58
+ - name : Retrieve new version commit
59
59
run : |
60
- new_version=$(jq -r '.${{ matrix.subsystem }}.commit' test/fixtures/wpt/versions.json)
61
- echo "new_version=$new_version" >> $GITHUB_ENV
60
+ new_version="$(
61
+ node -p 'require("./test/fixtures/wpt/versions.json")[process.argv[1]].commit' "$SUBSYSTEM"
62
+ )"
63
+ {
64
+ echo "long_version=$new_version"
65
+ echo "short_version=${new_version:0:10}"
66
+ } >> "$GITHUB_ENV"
67
+ env :
68
+ SUBSYSTEM : ${{ matrix.subsystem }}
62
69
63
70
- name : Open or update PR for the subsystem update
64
- uses : gr2m/create-or-update-pull-request-action@86ec1766034c8173518f61d2075cc2a173fb8c97
71
+ uses : gr2m/create-or-update-pull-request-action@77596e3166f328b24613f7082ab30bf2d93079d5
65
72
with :
66
73
branch : actions/update-wpt-${{ matrix.subsystem }}
67
74
author : Node.js GitHub Bot <github-bot@iojs.org>
68
- title : ' test: update WPT for ${{ matrix.subsystem }} to ${{ env.new_version }}'
69
- commit-message : ' test: update WPT for ${{ matrix.subsystem }} to ${{ env.new_version }}'
75
+ title : ' test: update WPT for ${{ matrix.subsystem }} to ${{ env.short_version }}'
76
+ commit-message : ' test: update WPT for ${{ matrix.subsystem }} to ${{ env.short_version }}'
70
77
labels : test
71
78
update-pull-request-title-and-body : true
72
- body : |
73
- This is an automated update of the WPT for ${{ matrix.subsystem }} to ${{ env.new_version }}.
79
+ body : >
80
+ This is an automated update of the WPT for ${{ matrix.subsystem }} to
81
+ https://github.com/web-platform-tests/wpt/commit/${{ env.long_version }}.
74
82
env :
75
83
GITHUB_TOKEN : ${{ secrets.GH_USER_TOKEN }}
0 commit comments