Files
base-configs-browserslist/.github/workflows/update-browserslist.yaml
Ismo Vuorinen 1c861d1adc chore: enforce least-privilege permissions in GitHub Actions workflows
Set top-level `permissions: {}` on all workflows and move required
permissions to job level. Switch publish.yml from secrets.PAT to
secrets.GITHUB_TOKEN so semantic-release can comment on PRs/issues.
2026-02-27 23:03:55 +02:00

51 lines
1.7 KiB
YAML

---
name: Update Browserslist database
on:
schedule:
# At 02:00 on day-of-month 1 and 15.
- cron: '0 2 1,15 * *'
workflow_dispatch:
permissions: {}
jobs:
update-browserslist-database:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Setup Node.js Environment
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
always-auth: true
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
scope: '@ivuorinen'
- name: Install and enable corepack
shell: sh
run: npm install -g corepack@latest --force && corepack enable
- name: Configure git
run: |
git config user.name "fiximus"
git config user.email "189535814+fiximus@users.noreply.github.com"
- name: Update Browserslist database and create PR if applies
uses: c2corg/browserslist-update-action@a76abb476199caea5399f9e28ff3f16e491ec566 # v2.5.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ vars.BROWSERSLIST_UPDATE_BRANCH || 'browserslist-update' }}
base_branch: ${{ vars.DEFAULT_BRANCH || 'main' }}
commit_message: 'chore(deps): update browserslist database'
title: 'chore(deps): update browserslist database'
body: Auto-generated by [browserslist-update-action](https://github.com/c2corg/browserslist-update-action/)
labels: 'maintenance'