From 8429c47e9e5adcc8353a3b0a1c5326f03d25f1d7 Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Tue, 22 Oct 2024 12:22:59 +0200 Subject: [PATCH 1/3] Pull request automation use full npm install This is likely to be cached and creates fewer problems with installing a specific workspace and patch package. --- .github/workflows/pull-request-automation.yml | 20 ++----------------- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/.github/workflows/pull-request-automation.yml b/.github/workflows/pull-request-automation.yml index 9aecafc2009e7..cf37fa00c060b 100644 --- a/.github/workflows/pull-request-automation.yml +++ b/.github/workflows/pull-request-automation.yml @@ -17,24 +17,8 @@ jobs: ref: trunk show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} - - name: Use desired version of Node.js - uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 - with: - node-version-file: '.nvmrc' - check-latest: true - - - name: Cache NPM packages - uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1 - with: - # npm cache files are stored in `~/.npm` on Linux/macOS - path: ~/.npm - key: ${{ runner.os }}-node-${{ matrix.node }}-npm-pr-automation-cache-${{ hashFiles('**/package-lock.json') }} - - # Changing into the action's directory and running `npm install` is much - # faster than a full project-wide `npm ci`. - - name: Install NPM dependencies - run: npm install - working-directory: packages/project-management-automation + - name: Setup Node.js and install dependencies + uses: ./.github/setup-node - uses: ./packages/project-management-automation with: From 4b3f016f674b73ca8a4a6685613e26f9fbba1dd5 Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Tue, 22 Oct 2024 12:26:29 +0200 Subject: [PATCH 2/3] REVERTME: Demo the flow working --- .github/workflows/pull-request-automation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull-request-automation.yml b/.github/workflows/pull-request-automation.yml index cf37fa00c060b..4f6d27f3a20ea 100644 --- a/.github/workflows/pull-request-automation.yml +++ b/.github/workflows/pull-request-automation.yml @@ -14,7 +14,7 @@ jobs: # isn't necessarily `trunk` (e.g. in the case of a merge). - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 with: - ref: trunk + ref: pull-request-automation/use-regular-npm-install show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} - name: Setup Node.js and install dependencies From b0b11e4fc1061431192a7d3f7c4721a2ad5db019 Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Tue, 22 Oct 2024 12:26:44 +0200 Subject: [PATCH 3/3] Revert "REVERTME: Demo the flow working" This reverts commit 4b3f016f674b73ca8a4a6685613e26f9fbba1dd5. --- .github/workflows/pull-request-automation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull-request-automation.yml b/.github/workflows/pull-request-automation.yml index 4f6d27f3a20ea..cf37fa00c060b 100644 --- a/.github/workflows/pull-request-automation.yml +++ b/.github/workflows/pull-request-automation.yml @@ -14,7 +14,7 @@ jobs: # isn't necessarily `trunk` (e.g. in the case of a merge). - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 with: - ref: pull-request-automation/use-regular-npm-install + ref: trunk show-progress: ${{ runner.debug == '1' && 'true' || 'false' }} - name: Setup Node.js and install dependencies