forked from mdn/browser-compat-data
-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (39 loc) · 1.06 KB
/
update-mdn-urls.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
name: Update MDN urls
on:
pull_request_target:
types:
- opened
paths:
- "package.json"
paths-ignore:
- "**/*.json"
jobs:
update-mdn-urls:
if: github.repository == 'mdn/browser-compat-data' && startsWith(github.head_ref, 'dependabot/npm_and_yarn/ddbeck/mdn-content-inventory-')
name: Update MDN urls
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: npm
- name: "Setup git"
run: |
git config user.email [email protected]
git config user.name mdn-bot
- name: Install
run: npm ci
- name: Update
run: |
npm run lint:fix -- --only=mdn_urls
if git diff --exit-code; then
echo "No changes."
else
git commit -m 'chore: fix mdn urls' .
git push
fi