-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added a shared workflow to auto update browserslist in the MFEs (…
…#29)
- Loading branch information
1 parent
afcbf75
commit 8f3182d
Showing
3 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
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
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 |
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
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 |
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
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": [] | ||
} |