Skip to content

Update web-features tags #18

Update web-features tags

Update web-features tags #18

name: Update web-features tags
on:
workflow_dispatch:
schedule:
- cron: "30 4 * * 1-5"
permissions:
contents: write
pull-requests: write
jobs:
update-web-features:
if: github.repository == 'mdn/browser-compat-data'
name: Update web-features-tags
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.GH_TOKEN }}
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version-file: ".nvmrc"
package-manager-cache: false
- name: "Setup git"
run: |
git config user.email [email protected]
git config user.name mdn-bot
- name: Install
env:
# Temporary workaround to install lefthook hooks.
CI: ""
run: npm ci
- name: Update tags
id: update
run: |
echo "RESULT<<EOF" >> "$GITHUB_OUTPUT"
npm run tag-web-features .. >> "$GITHUB_OUTPUT"
echo "EOF" >> "$GITHUB_OUTPUT"
- name: Create Pull Request
uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725 # v8.0.0
with:
token: ${{ secrets.GH_TOKEN }} # need the rights to create and edit PRs
commit-message: Update web-features tags
author: mdn-bot <[email protected]>
signoff: false
branch: web-features-tags
delete-branch: true
add-paths: "*.json"
title: "Update web-features tags"
body: |
The output of the `tag-web-features` script is:
${{ steps.update.outputs.RESULT }}
draft: false