-
Notifications
You must be signed in to change notification settings - Fork 72
64 lines (55 loc) · 2.22 KB
/
update-ed.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
on:
schedule:
- cron: '30 */6 * * *'
workflow_dispatch:
name: Update ED report
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci
# Note command to Reffy explicitly mentions a few discontinued specs,
# kept in the crawl for cross-referencing purpose.
- name: Run Reffy's crawler
run: |
mkdir report
node_modules/.bin/reffy --post csscomplete --post annotatelinks --post patchdfns --output report --fallback ed/index.json --spec all DOM-Level-2-Style selectors-nonelement-1 tracking-dnt rfc7230 rfc7231 rfc7232 rfc7233 rfc7234 rfc7235
# Update another Webref checkout to reduce the chances that the version we
# checked out is no longer in sync with origin by the time the crawl is over
- name: Checkout webref once more
uses: actions/checkout@v4
with:
path: webref
- name: Copy report
run: rsync -av report/ webref/ed/
- name: Drop extract files from specs that are no longer crawled
run: node tools/clean-dropped-specs-files.js ed
working-directory: webref
- name: Bump minor version of packages if needed
run: node tools/bump-packages-minor.js
working-directory: webref
- name: Push updates to git
run: |
git config user.name "reffy-bot"
git config user.email "<>"
git remote set-url --push origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
git add -A
REFFY_SHA=$(../node_modules/.bin/reffy --version)
git commit -m "Update of ED report from new reffy run" -m "Using reffy commit $REFFY_SHA."
git push origin HEAD:main
working-directory: webref
- name: Notify webref-analysis that it should update itself
run: |
curl -X POST \
-H "Authorization: Bearer ${{secrets.WEBREF_ANALYSIS_TOKEN}}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/w3c/webref-analysis/actions/workflows/analyze.yml/dispatches \
-d '{"ref": "main"}'