browserslist #287
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: browserslist | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
pull_request: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
defaults: | |
run: | |
shell: bash | |
env: | |
CI: '' | |
COMMIT_SHA: ${{ github.event.pull_request.head.sha }} | |
PULL_NUMBER: ${{ github.event.pull_request.number }} | |
RUN_ID: ${{ github.run_id }} | |
TITLE: ${{ github.event.pull_request.title }} | |
COMMIT_MSG: ${{ github.event.head_commit.message }} | |
jobs: | |
pipeline: | |
name: Node ${{ matrix.node }} on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
node: ['18.x'] | |
os: ['ubuntu-latest'] | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- run: echo "Checking $TITLE" | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
registry-url: 'https://registry.npmjs.org' | |
always-auth: TRUE | |
- name: Install npm dependencies | |
id: install | |
run: | | |
npm install | |
echo "::set-output name=install::nodejs" | |
- name: Run test | |
run: npm run test | |
id: test | |
- name: Run test | |
run: npm run update | |
id: update | |
- name: Configure git | |
run: | | |
git config --global user.email "action@github.com" | |
git config --global user.name "GitHub Action" | |
- name: Update caniuse database and create PR if applies | |
uses: c2corg/browserslist-update-action@v2.2.2 | |
with: | |
github_token: ${{ secrets.ACTIONS_PAT }} | |
branch: master | |
commit_message: "chore(auto): update browserslist db" | |
title: "Build Automation: update browserslist db" | |
body: Auto-generated by [browserslist-update-action](https://github.com/c2corg/browserslist-update-action/) |