8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f89bd2b commit 1893be4Copy full SHA for 1893be4
.github/workflows/update-wpt.yml
@@ -27,7 +27,7 @@ jobs:
27
subsystem: ${{ fromJSON(github.event.inputs.subsystems || '["url", "WebCryptoAPI"]') }}
28
29
steps:
30
- - uses: actions/checkout@6d193bf28034eafb982f37bd894289fe649468fc # v4.1.7
+ - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
31
with:
32
persist-credentials: false
33
@@ -43,33 +43,41 @@ jobs:
43
run: |
44
ncu-config set username "$USERNAME"
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)"
+ ncu-config set owner "${GITHUB_REPOSITORY_OWNER}"
+ ncu-config set repo "$(echo "$GITHUB_REPOSITORY" | cut -d/ -f2)"
49
env:
50
USERNAME: ${{ secrets.JENKINS_USER }}
51
GH_TOKEN: ${{ secrets.GH_USER_TOKEN }}
52
- JENKINS_TOKEN: ${{ secrets.JENKINS_TOKEN }}
53
54
- name: Update WPT for subsystem ${{ matrix.subsystem }}
55
56
- git node wpt ${{ matrix.subsystem }}
+ git node wpt "$SUBSYSTEM"
+ env:
+ SUBSYSTEM: ${{ matrix.subsystem }}
57
58
- - name: Calculate new version for WPT using jq
+ - name: Retrieve new version commit
59
60
- new_version=$(jq -r '.${{ matrix.subsystem }}.commit' test/fixtures/wpt/versions.json)
61
- echo "new_version=$new_version" >> $GITHUB_ENV
+ new_version="$(
+ 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
68
69
70
- name: Open or update PR for the subsystem update
- uses: gr2m/create-or-update-pull-request-action@86ec1766034c8173518f61d2075cc2a173fb8c97
71
+ uses: gr2m/create-or-update-pull-request-action@77596e3166f328b24613f7082ab30bf2d93079d5
72
73
branch: actions/update-wpt-${{ matrix.subsystem }}
74
author: Node.js GitHub Bot <github-bot@iojs.org>
- title: 'test: update WPT for ${{ matrix.subsystem }} to ${{ env.new_version }}'
- 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 }}'
77
labels: test
78
update-pull-request-title-and-body: true
- body: |
- 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 }}.
82
83
GITHUB_TOKEN: ${{ secrets.GH_USER_TOKEN }}