Release v7.1.19 #2413
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 MDN urls | |
| on: | |
| pull_request_target: | |
| branches: | |
| - main | |
| paths: | |
| - "package-lock.json" | |
| permissions: | |
| contents: write | |
| pull-requests: read | |
| jobs: | |
| update-mdn-urls: | |
| if: github.repository == 'mdn/browser-compat-data' && github.event.pull_request.user.login == 'dependabot[bot]' && startsWith(github.head_ref, 'dependabot/npm_and_yarn/ddbeck/mdn-content-inventory-') | |
| name: Update MDN urls | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| ref: ${{ github.head_ref }} | |
| token: ${{ secrets.GH_TOKEN }} | |
| # Need credentials to push changes. | |
| persist-credentials: true | |
| - 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 [email protected] | |
| git config user.name mdn-bot | |
| - name: Install | |
| env: | |
| # Temporary workaround to install lefthook hooks. | |
| CI: "" | |
| run: npm ci | |
| - name: Update | |
| env: | |
| REF: ${{ github.head_ref }} | |
| run: | | |
| npm run lint:fix -- --only=mdn_urls | |
| if git diff --exit-code; then | |
| echo "No changes." | |
| else | |
| git commit -m 'chore: fix mdn urls' . | |
| git push origin "$REF" | |
| fi |