Skip to content

Update Browserslist Statistics #30

Update Browserslist Statistics

Update Browserslist Statistics #30

on:
schedule:
- cron: 00 16 31 * *
name: Update Browserslist Statistics
jobs:
stats:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
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}}