diff --git a/.github/workflows/choco.yaml b/.github/workflows/choco.yaml index 7acadd3..c3abd2a 100644 --- a/.github/workflows/choco.yaml +++ b/.github/workflows/choco.yaml @@ -10,8 +10,13 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 2 + - name: Install Node.js + uses: actions/setup-node@v4 + if: env.CHOCO_CHANGED == 'true' + with: + node-version: 20.10.x - name: Set CHOCO_CHANGED - run: echo "CHOCO_CHANGED=$(git diff --name-only ${{ github.event.before }} ${{ github.event.after }} | grep -Fqx choco.json && echo \"true\")" >> $env:GITHUB_ENV + run: echo "CHOCO_CHANGED=true" >> $env:GITHUB_ENV - name: Create cache directory if: env.CHOCO_CHANGED == 'true' run: mkdir "$($env:LOCALAPPDATA)\choco-cache"