name: Node.js Dependency Holds on: pull_request: concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: path-filter: permissions: pull-requests: read runs-on: ubuntu-latest outputs: changes: ${{ steps.filter.outputs.changes }} steps: - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 - id: filter uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 with: # TODO(cemmer): this is broken, have to use the 'push' event base: ${{ github.ref }} filters: | changes: - 'package*.json' node-install-hold: needs: - path-filter if: ${{ needs.path-filter.outputs.changes == 'true' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 - uses: volta-cli/action@5c175f92dea6f48441c436471e6479dbc192e194 # v4.2.1 - uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4 with: path: | ~/.npm ~\AppData\Roaming\npm-cache key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} restore-keys: | ${{ runner.os }}-npm- ${{ runner.os }}- - run: npm ci - id: install-hold run: | EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) { echo "JSON<<$EOF" npm run --silent install:hold echo "$EOF" } >> "${GITHUB_OUTPUT}" - uses: thollander/actions-comment-pull-request@24bffb9b452ba05a4f3f77933840a6a841d1b32b # v3.0.1 with: message: | ## :hand: Dependency holds A `package*.json` file changed in this pull request. As a notice, these dependencies are potentially being held back by the project's minimum supported Node.js version: ```json ${{ steps.install-hold.outputs.JSON }} ``` _Comment generated by the [${{ github.workflow }}](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}) workflow._ comment-tag: package-hold