-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (46 loc) · 1.65 KB
/
browserslist-stats-cron.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
on:
schedule:
- cron: 00 16 31 * *
name: Update Browserslist Statistics
jobs:
stats:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '12.x'
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{secrets.SSH_PRIVATE_KEY}}
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v3
id: yarn-cache
with:
path: |
node_modules
*/*/node_modules
key: ${{ matrix.node-version}}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: Create new stats file
run: |
yarn workspace @xerox/browserslist-config run update:stats
npx prettier ./packages/xerox-browserslist-config/browserslist-stats.json --write
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
BAA_PRIVATE_KEY: ${{secrets.ADOBE_ANALYTICS_PRIVATE_KEY}}
- name: Create PR
uses: peter-evans/create-pull-request@v5
with:
commit-message: 'chore(browserslist-config): update stats'
title: 'chore(browserslist-config): update stats'
body: |
The `@xerox/browserslist-config` `browserslist-stats.json` file was updated with the last 3 months of Adobe Analytics data.
Please check the data looks reasonable and merge this PR.
labels: cron
branch: cron/stats
branch-suffix: timestamp
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}