-
Notifications
You must be signed in to change notification settings - Fork 5
39 lines (37 loc) · 1.07 KB
/
browserslist.yml
File metadata and controls
39 lines (37 loc) · 1.07 KB
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
name: Update browserslist
on:
schedule:
- cron: "15 14 * * 3"
permissions:
contents: write
jobs:
update:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: latest
cache: 'npm'
- name: Update browsers list
run: npx --yes update-browserslist-db@latest
- name: Check for Changes
id: check_changes
run: |
if [[ -n "$(git diff --exit-code)" ]]; then
echo "Changes detected."
echo "::set-output name=has_changes::true"
else
echo "No changes detected."
echo "::set-output name=has_changes::false"
fi
- name: Save updated db
if: steps.check_changes.outputs.has_changes == 'true'
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git add package-lock.json
git commit -m "chore: bump browserslist"
git push origin HEAD:main