Skip to content

Update browser releases #58

Update browser releases

Update browser releases #58

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@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
fetch-depth: 0 # get the full repository checkout, not just the inciting commit
persist-credentials: false
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.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@84ae59a2cdc2258d6fa0732dd66352dddae2a412 # v7.0.9
with:
token: ${{ secrets.GH_TOKEN }} # need the rights to create and edit PRs
commit-message: Update browser releases
author: mdn-bot <[email protected]>
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