Skip to content

Update browser releases #651

Update browser releases

Update browser releases #651

name: Update browser releases
on:
workflow_dispatch:
schedule:
- cron: "30 4 * * 1-5"
permissions:
contents: write
pull-requests: write
jobs:
update:
if: github.repository == 'mdn/browser-compat-data'
name: Update browser releases
runs-on: ubuntu-latest
env:
RESULT: ""
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0 # get the full repository checkout, not just the inciting commit
persist-credentials: false
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: ".nvmrc"
package-manager-cache: false
- run: npm ci
- name: Run update-browser-releases script
id: update
run: |
echo "RESULT<<EOF" >> "$GITHUB_OUTPUT"
npm run update-browser-releases -- --all >> "$GITHUB_OUTPUT"
echo "EOF" >> "$GITHUB_OUTPUT"
- name: Create Pull Request
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
with:
token: ${{ secrets.GH_TOKEN }} # need the rights to create and edit PRs
commit-message: Update browser releases
author: mdn-bot <108879845+mdn-bot@users.noreply.github.com>
committer: mdn-bot <108879845+mdn-bot@users.noreply.github.com>
signoff: false
branch: browser-releases
delete-branch: true
add-paths: browsers/*.json # Only include files in that directory
title: "Update browser releases"
body: |
The output of the `update-browser-releases` script is:
${{ steps.update.outputs.RESULT }}
draft: false