Skip to content

Commit

Permalink
Add action to update web-features tags
Browse files Browse the repository at this point in the history
  • Loading branch information
queengooborg committed Jan 18, 2025
1 parent 529d4cf commit afdb2ad
Showing 1 changed file with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/update-web-features.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Update web-features tags

on:
workflow_dispatch:

schedule:
- cron: "30 4 * * 1-5"

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@v4
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.GH_TOKEN }}

- name: Checkout web-features
uses: actions/checkout@v4
with:
repository: web-platform-dx/web-features
path: web-features

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: npm

- name: "Setup git"
run: |
git config user.email [email protected]
git config user.name mdn-bot
- name: Install
run: npm ci

- name: Install in web-features
working-directory: ./web-features
run: NODE_ENV=development npm ci

- name: Update tags
working-directory: ./web-features
run: |
echo "RESULT<<EOF" >> $GITHUB_ENV
npm run migrate-to-bcd .. >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Delete web-features directory
run: rm -r web-features

- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
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 `migrate-to-bcd` script is:
${{ env.RESULT }}
draft: false

0 comments on commit afdb2ad

Please sign in to comment.