mirror of
https://github.com/n8n-io/n8n.git
synced 2026-05-28 07:17:04 +02:00
ci: Optimize .github/scripts runs via caching and reduced checkout depth (#30691)
This commit is contained in:
parent
a5f90bf564
commit
f7ff69abae
5
.github/actions/setup-nodejs/action.yml
vendored
5
.github/actions/setup-nodejs/action.yml
vendored
|
|
@ -22,6 +22,10 @@ inputs:
|
|||
description: 'Command to execute for installing project dependencies. Leave empty to skip install step.'
|
||||
required: false
|
||||
default: 'pnpm install --frozen-lockfile'
|
||||
cache-dependency-path:
|
||||
description: 'Path(s) to the lockfile(s) used to compute the pnpm-store cache key. Scope this down (e.g. to `.github/scripts/pnpm-lock.yaml`) when only installing a subset, to avoid restoring the full workspace store.'
|
||||
required: false
|
||||
default: 'pnpm-lock.yaml'
|
||||
|
||||
runs:
|
||||
using: 'composite'
|
||||
|
|
@ -34,6 +38,7 @@ runs:
|
|||
with:
|
||||
node-version: ${{ inputs.node-version }}
|
||||
cache: 'pnpm'
|
||||
cache-dependency-path: ${{ inputs.cache-dependency-path }}
|
||||
|
||||
# To avoid setup-node cache failure.
|
||||
# see: https://github.com/actions/setup-node/issues/1137
|
||||
|
|
|
|||
3
.github/workflows/backport.yml
vendored
3
.github/workflows/backport.yml
vendored
|
|
@ -33,13 +33,14 @@ jobs:
|
|||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
token: ${{ steps.generate-token.outputs.token }}
|
||||
fetch-depth: 0
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: ./.github/actions/setup-nodejs
|
||||
with:
|
||||
build-command: ''
|
||||
install-command: pnpm install --frozen-lockfile --dir ./.github/scripts --ignore-workspace
|
||||
cache-dependency-path: .github/scripts/pnpm-lock.yaml
|
||||
|
||||
- name: Compute backport targets
|
||||
id: targets
|
||||
|
|
|
|||
1
.github/workflows/ci-detect-new-packages.yml
vendored
1
.github/workflows/ci-detect-new-packages.yml
vendored
|
|
@ -21,6 +21,7 @@ jobs:
|
|||
with:
|
||||
build-command: ''
|
||||
install-command: pnpm install --frozen-lockfile --dir ./.github/scripts --ignore-workspace
|
||||
cache-dependency-path: .github/scripts/pnpm-lock.yaml
|
||||
|
||||
- name: Check for new unpublished packages
|
||||
id: detect
|
||||
|
|
|
|||
3
.github/workflows/ci-pr-quality.yml
vendored
3
.github/workflows/ci-pr-quality.yml
vendored
|
|
@ -37,6 +37,7 @@ jobs:
|
|||
with:
|
||||
build-command: ''
|
||||
install-command: pnpm install --frozen-lockfile --dir ./.github/scripts --ignore-workspace
|
||||
cache-dependency-path: .github/scripts/pnpm-lock.yaml
|
||||
|
||||
- name: Re-request PR Size Limit check
|
||||
env:
|
||||
|
|
@ -69,6 +70,7 @@ jobs:
|
|||
with:
|
||||
build-command: ''
|
||||
install-command: pnpm install --frozen-lockfile --dir ./.github/scripts --ignore-workspace
|
||||
cache-dependency-path: .github/scripts/pnpm-lock.yaml
|
||||
|
||||
- name: Check ownership checkbox
|
||||
env:
|
||||
|
|
@ -101,6 +103,7 @@ jobs:
|
|||
with:
|
||||
build-command: ''
|
||||
install-command: pnpm install --frozen-lockfile --dir ./.github/scripts --ignore-workspace
|
||||
cache-dependency-path: .github/scripts/pnpm-lock.yaml
|
||||
|
||||
- name: Check PR size
|
||||
env:
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ jobs:
|
|||
with:
|
||||
build-command: ''
|
||||
install-command: pnpm install --frozen-lockfile --dir ./.github/scripts --ignore-workspace
|
||||
cache-dependency-path: .github/scripts/pnpm-lock.yaml
|
||||
|
||||
- name: Create GitHub releases
|
||||
env:
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ jobs:
|
|||
with:
|
||||
build-command: ''
|
||||
install-command: pnpm install --frozen-lockfile --dir ./.github/scripts --ignore-workspace
|
||||
cache-dependency-path: .github/scripts/pnpm-lock.yaml
|
||||
|
||||
- name: Determine release candidate branch from track
|
||||
id: determine-branch
|
||||
|
|
|
|||
1
.github/workflows/release-create-pr.yml
vendored
1
.github/workflows/release-create-pr.yml
vendored
|
|
@ -80,6 +80,7 @@ jobs:
|
|||
with:
|
||||
build-command: ''
|
||||
install-command: pnpm install --frozen-lockfile --dir ./.github/scripts --ignore-workspace
|
||||
cache-dependency-path: .github/scripts/pnpm-lock.yaml
|
||||
|
||||
- name: Setup corepack and pnpm
|
||||
run: |
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ jobs:
|
|||
with:
|
||||
build-command: ''
|
||||
install-command: pnpm install --frozen-lockfile --dir ./.github/scripts --ignore-workspace
|
||||
cache-dependency-path: .github/scripts/pnpm-lock.yaml
|
||||
|
||||
- name: Extract changes
|
||||
id: get-changes
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ jobs:
|
|||
with:
|
||||
build-command: ''
|
||||
install-command: pnpm install --frozen-lockfile --dir ./.github/scripts --ignore-workspace
|
||||
cache-dependency-path: .github/scripts/pnpm-lock.yaml
|
||||
|
||||
- name: Promote GitHub releases
|
||||
env:
|
||||
|
|
|
|||
4
.github/workflows/release-publish.yml
vendored
4
.github/workflows/release-publish.yml
vendored
|
|
@ -24,13 +24,15 @@ jobs:
|
|||
- name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
fetch-depth: 1
|
||||
fetch-tags: true
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: ./.github/actions/setup-nodejs
|
||||
with:
|
||||
build-command: ''
|
||||
install-command: pnpm install --frozen-lockfile --dir ./.github/scripts --ignore-workspace
|
||||
cache-dependency-path: .github/scripts/pnpm-lock.yaml
|
||||
|
||||
- name: Determine track from package version number
|
||||
id: determine-info
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ jobs:
|
|||
with:
|
||||
build-command: ''
|
||||
install-command: pnpm install --frozen-lockfile --dir ./.github/scripts --ignore-workspace
|
||||
cache-dependency-path: .github/scripts/pnpm-lock.yaml
|
||||
|
||||
- name: Set npm packages to latest
|
||||
run: node ./.github/scripts/set-latest-for-monorepo-packages.mjs
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ jobs:
|
|||
with:
|
||||
build-command: ''
|
||||
install-command: pnpm install --frozen-lockfile --dir ./.github/scripts --ignore-workspace
|
||||
cache-dependency-path: .github/scripts/pnpm-lock.yaml
|
||||
|
||||
- name: Configure git author
|
||||
run: |
|
||||
|
|
|
|||
|
|
@ -31,13 +31,14 @@ jobs:
|
|||
- name: Checkout
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: ./.github/actions/setup-nodejs
|
||||
with:
|
||||
build-command: ''
|
||||
install-command: pnpm install --frozen-lockfile --dir ./.github/scripts --ignore-workspace
|
||||
cache-dependency-path: .github/scripts/pnpm-lock.yaml
|
||||
|
||||
- name: Send release notification
|
||||
env:
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ jobs:
|
|||
with:
|
||||
build-command: ''
|
||||
install-command: pnpm install --frozen-lockfile --dir ./.github/scripts --ignore-workspace
|
||||
cache-dependency-path: .github/scripts/pnpm-lock.yaml
|
||||
|
||||
- name: Run tests
|
||||
id: run-tests
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ jobs:
|
|||
with:
|
||||
build-command: ''
|
||||
install-command: pnpm install --frozen-lockfile --dir ./.github/scripts --ignore-workspace
|
||||
cache-dependency-path: .github/scripts/pnpm-lock.yaml
|
||||
|
||||
- name: Cleanup release branch if PR qualifies
|
||||
run: node .github/scripts/cleanup-release-branch.mjs
|
||||
|
|
|
|||
|
|
@ -26,13 +26,15 @@ jobs:
|
|||
- name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
fetch-depth: 1
|
||||
fetch-tags: true
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: ./.github/actions/setup-nodejs
|
||||
with:
|
||||
build-command: ''
|
||||
install-command: pnpm install --frozen-lockfile --dir ./.github/scripts --ignore-workspace
|
||||
cache-dependency-path: .github/scripts/pnpm-lock.yaml
|
||||
|
||||
- name: Extract release versions
|
||||
id: get-tags
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ jobs:
|
|||
- name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
fetch-depth: 1
|
||||
fetch-tags: true
|
||||
|
||||
- name: Setup NodeJS
|
||||
|
|
@ -29,6 +29,7 @@ jobs:
|
|||
with:
|
||||
build-command: ''
|
||||
install-command: pnpm install --frozen-lockfile --dir ./.github/scripts --ignore-workspace
|
||||
cache-dependency-path: .github/scripts/pnpm-lock.yaml
|
||||
|
||||
- name: Ensure release-candidate branches
|
||||
env:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user