2727 subsystem : ${{ fromJSON(github.event.inputs.subsystems || '["url", "WebCryptoAPI"]') }}
2828
2929 steps :
30- - uses : actions/checkout@6d193bf28034eafb982f37bd894289fe649468fc # v4.1.7
30+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3131 with :
3232 persist-credentials : false
3333
@@ -43,33 +43,41 @@ jobs:
4343 run : |
4444 ncu-config set username "$USERNAME"
4545 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)"
4948 env :
5049 USERNAME : ${{ secrets.JENKINS_USER }}
5150 GH_TOKEN : ${{ secrets.GH_USER_TOKEN }}
52- JENKINS_TOKEN : ${{ secrets.JENKINS_TOKEN }}
5351
5452 - name : Update WPT for subsystem ${{ matrix.subsystem }}
5553 run : |
56- git node wpt ${{ matrix.subsystem }}
54+ git node wpt "$SUBSYSTEM"
55+ env :
56+ SUBSYSTEM : ${{ matrix.subsystem }}
5757
58- - name : Calculate new version for WPT using jq
58+ - name : Retrieve new version commit
5959 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 }}
6269
6370 - 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
6572 with :
6673 branch : actions/update-wpt-${{ matrix.subsystem }}
6774 author :
Node.js GitHub Bot <[email protected] > 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 }}'
7077 labels : test
7178 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 }}.
7482 env :
7583 GITHUB_TOKEN : ${{ secrets.GH_USER_TOKEN }}
0 commit comments