Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/update-browserslist-db.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Update Browserslist DB
on:
- workflow_call

jobs:
update-dep:
runs-on: ubuntu-latest
strategy:
matrix:
node: [16]
npm: [8.5.x]

steps:
- name: Check out the repo
uses: actions/checkout@v2

- name: Install node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}

- name: Install dependencies
run: npm install -g npm@${{ matrix.npm }}

- name: Install Packages
run: npm ci

- name: Update dependencies
run: npx update-browserslist-db@latest

- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.requirements_bot_github_token }}
commit-message: 'chore: update browserslist DB'
title: Update browserslist DB
body: |
Updated browserslist DB
branch: update-browserslist-db

- name: Enable Pull Request Automerge
if: steps.cpr.outputs.pull-request-operation == 'created'
uses: peter-evans/enable-pull-request-automerge@v2
with:
token: ${{ secrets.requirements_bot_github_token }}
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
merge-method: squash
11 changes: 11 additions & 0 deletions workflow-templates/update-browserslist-db.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Run weekly to create a PR that updates browserslist DB

name: Update Browserslist DB
on:
schedule:
- cron: '0 0 * * 1'
workflow_dispatch:

jobs:
update-browserslist:
uses: openedx/.github/.github/workflows/update-browserslist-db.yml@master
7 changes: 7 additions & 0 deletions workflow-templates/update-browserslist.properties-db.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "Auto Update Browserslist DB Workflow",
"description": "Run weekly to create a PR that updates browserslist DB",
"iconName": "edx-workflow-template-icon",
"categories": [],
"filePatterns": []
}