From 62e952f1e6d02eb6778b99f272a300d77d4d87a3 Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Wed, 22 Nov 2023 01:04:28 +0800 Subject: [PATCH] Try to fix "close-incorrect-issue.yml" --- .github/workflows/close-incorrect-issue.yml | 27 +++++++++++++++++---- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/.github/workflows/close-incorrect-issue.yml b/.github/workflows/close-incorrect-issue.yml index 762bc96..ab4e2e4 100644 --- a/.github/workflows/close-incorrect-issue.yml +++ b/.github/workflows/close-incorrect-issue.yml @@ -16,10 +16,27 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + - uses: pnpm/action-setup@v2 + name: Install pnpm with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - run: npm ci + version: 8 + run_install: false + + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install + + - name: Close Incorrect Issue - run: node extra/close-incorrect-issue.js ${{ secrets.GITHUB_TOKEN }} ${{ github.event.issue.number }} ${{ github.event.issue.user.login }}