diff --git a/.github/actions/setup-pnpm/action.yml b/.github/actions/setup-pnpm/action.yml index 6eae9bd1..bc092103 100644 --- a/.github/actions/setup-pnpm/action.yml +++ b/.github/actions/setup-pnpm/action.yml @@ -1,7 +1,7 @@ # yaml-language-server: $schema=https://json.schemastore.org/github-action.json -name: 'Restore pnpm cache' -description: 'Sets up Node and pnpm, restores node_modules and ~/.cache/ from cache (no install)' +name: 'Setup pnpm' +description: 'Sets up Node and pnpm with lockfile-keyed store caching, then installs dependencies' inputs: node-version: description: 'Version of Node' @@ -10,13 +10,11 @@ inputs: runs: using: 'composite' steps: - - uses: pnpm/action-setup@8912a9102ac27614460f54aedde9e1e7f9aec20d #v6.0.5 + - uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 #v6.0.8 - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e #v6.4.0 with: node-version: ${{ inputs.node-version }} - - uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae #v5.0.5 - with: - path: | - node_modules - ~/.cache/ - key: ${{ runner.os }}-node-${{ hashFiles('pnpm-lock.yaml') }} + cache: pnpm + - name: Install dependencies + shell: bash + run: pnpm install --frozen-lockfile diff --git a/.github/workflows/check-dist.yml b/.github/workflows/check-dist.yml index 0bdd1193..faeccef7 100644 --- a/.github/workflows/check-dist.yml +++ b/.github/workflows/check-dist.yml @@ -27,10 +27,7 @@ concurrency: cancel-in-progress: true jobs: - setup: - uses: ./.github/workflows/setup.yml check-dist: - needs: setup runs-on: ubuntu-latest timeout-minutes: 5 steps: diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml deleted file mode 100644 index 6974acad..00000000 --- a/.github/workflows/setup.yml +++ /dev/null @@ -1,35 +0,0 @@ -# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json - -name: setup - -on: - workflow_call: - -jobs: - setup: - runs-on: ubuntu-latest - timeout-minutes: 5 - permissions: - contents: read - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2 - with: - persist-credentials: false - - name: Cache - id: cache - uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae #v5.0.5 - with: - path: | - node_modules - ~/.cache/ - key: ${{ runner.os }}-node-${{ hashFiles('pnpm-lock.yaml') }} - - if: steps.cache.outputs.cache-hit != 'true' - uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 #v6.0.8 - - if: steps.cache.outputs.cache-hit != 'true' - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e #v6.4.0 - with: - node-version: 24 - cache: pnpm - - name: Install dependencies - if: steps.cache.outputs.cache-hit != 'true' - run: pnpm install diff --git a/.github/workflows/sync-readme-versions.yml b/.github/workflows/sync-readme-versions.yml index faf2e677..fe8eceb5 100644 --- a/.github/workflows/sync-readme-versions.yml +++ b/.github/workflows/sync-readme-versions.yml @@ -15,13 +15,8 @@ concurrency: permissions: {} jobs: - setup: - if: ${{ github.repository == 'andykenward/github-actions-cloudflare-pages' }} - permissions: - contents: read - uses: ./.github/workflows/setup.yml sync: - needs: setup + if: ${{ github.repository == 'andykenward/github-actions-cloudflare-pages' }} name: Sync action version references runs-on: ubuntu-latest permissions: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8ae763f6..2f125b68 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,10 +17,7 @@ concurrency: cancel-in-progress: true jobs: - setup: - uses: ./.github/workflows/setup.yml test: - needs: setup runs-on: ubuntu-latest timeout-minutes: 5 steps: diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index a7e93218..e55cc4cf 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -12,12 +12,7 @@ concurrency: permissions: {} jobs: - setup: - permissions: - contents: read - uses: ./.github/workflows/setup.yml download: - needs: setup permissions: contents: write pull-requests: write @@ -52,7 +47,6 @@ jobs: body: | This is an automated PR to update payloads. types: - needs: setup permissions: contents: write pull-requests: write @@ -85,7 +79,6 @@ jobs: body: | This is an automated PR to update generated types. schema: - needs: setup permissions: contents: write pull-requests: write