mirror of
https://github.com/outline/outline.git
synced 2026-12-02 01:34:47 +03:00
ci: Remove Blacksmith sticky disks (#13935)
The sticky disks for the Node.js toolcache, yarn cache and node_modules cost more than the install time they save. The install action uses the setup-node yarn cache again.
This commit is contained in:
1 parent
d410db1b24
commit
8ca53c0c3a
2 files changed
+3
-25
No files matched your search
@@ -1,15 +1,8 @@
|
||||
name: Install
|
||||
description: Set up Node.js, Corepack, and install dependencies with yarn cache
|
||||
# The Blacksmith condition must match the runner selection in workflows/ci.yml.
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Mount Node.js toolcache
|
||||
if: ${{ github.repository_owner == 'outline' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) }}
|
||||
uses: useblacksmith/stickydisk@94697d49e77d0dd78b77deb85ad3de63a28b4b8a # v1.7.1
|
||||
with:
|
||||
key: ${{ github.repository }}-node-toolcache
|
||||
path: /opt/hostedtoolcache/node
|
||||
- name: Enable Corepack
|
||||
shell: bash
|
||||
run: corepack enable
|
||||
@@ -17,20 +10,7 @@ runs:
|
||||
uses: actions/setup-node@v5
|
||||
with:
|
||||
node-version-file: package.json
|
||||
# Blacksmith jobs persist the yarn cache on a sticky disk instead.
|
||||
package-manager-cache: ${{ !(github.repository_owner == 'outline' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)) }}
|
||||
- name: Mount yarn cache
|
||||
if: ${{ github.repository_owner == 'outline' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) }}
|
||||
uses: useblacksmith/stickydisk@94697d49e77d0dd78b77deb85ad3de63a28b4b8a # v1.7.1
|
||||
with:
|
||||
key: ${{ github.repository }}-yarn-cache
|
||||
path: ~/.yarn/berry/cache
|
||||
- name: Mount node_modules
|
||||
if: ${{ github.repository_owner == 'outline' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) }}
|
||||
uses: useblacksmith/stickydisk@94697d49e77d0dd78b77deb85ad3de63a28b4b8a # v1.7.1
|
||||
with:
|
||||
key: ${{ github.repository }}-node-modules
|
||||
path: ./node_modules
|
||||
cache: "yarn"
|
||||
- name: Install dependencies
|
||||
shell: bash
|
||||
run: yarn install --immutable
|
||||
@@ -19,8 +19,7 @@ env:
|
||||
jobs:
|
||||
changes:
|
||||
# Blacksmith runners are only available to the outline organization, and are
|
||||
# not used for pull requests from forks so that fork-controlled code cannot
|
||||
# write to the shared sticky disks. Keep in sync with actions/install.
|
||||
# not used for pull requests from forks.
|
||||
runs-on: ${{ (github.repository_owner == 'outline' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)) && 'blacksmith-8vcpu-ubuntu-2404' || 'ubuntu-latest' }}
|
||||
outputs:
|
||||
runner: ${{ (github.repository_owner == 'outline' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)) && 'blacksmith-8vcpu-ubuntu-2404' || 'ubuntu-latest' }}
|
||||
@@ -87,8 +86,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: ./.github/actions/install
|
||||
# The sticky-disk node_modules persists the tsc build cache, which can
|
||||
# replay stale diagnostics; always run a full check in CI.
|
||||
# No tsc build cache persists between runs, so skip writing one.
|
||||
- run: yarn tsc --incremental false
|
||||
|
||||
audit:
|
||||
|
||||
Reference in new issue
Block a user