Update web-features tags #4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| with: | |
| ref: ${{ github.head_ref }} | |
| token: ${{ secrets.GH_TOKEN }} | |
| persist-credentials: false | |
| - name: Setup Node.js | |
| uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 | |
| with: | |
| node-version-file: ".nvmrc" | |
| package-manager-cache: false | |
| - name: "Setup git" | |
| run: | | |
| git config user.email 108879845+mdn-bot@users.noreply.github.com | |
| 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@84ae59a2cdc2258d6fa0732dd66352dddae2a412 # v7.0.9 | |
| with: | |
| token: ${{ secrets.GH_TOKEN }} # need the rights to create and edit PRs | |
| commit-message: Update web-features tags | |
| author: mdn-bot <108879845+mdn-bot@users.noreply.github.com> | |
| 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 |