Skip to content

Commit

Permalink
chore: use .node-version
Browse files Browse the repository at this point in the history
Signed-off-by: Mogyuchi <[email protected]>
  • Loading branch information
Mogyuchi committed Dec 20, 2023
1 parent a7265bd commit ccc0379
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 24 deletions.
15 changes: 3 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,10 @@ jobs:
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Install pnpm
uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598 # v2.4.0
- uses: actions/[email protected]
with:
standalone: true
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
cache: "pnpm"
node-version-file: ".node-version"
- name: Install dependencies
run: pnpm install --frozen-lockfile --strict-peer-dependencies
- name: Check types
Expand Down
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20.10.0
2 changes: 0 additions & 2 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use-node-version=20.10.0

save-exact=true
auto-install-peers=true
strict-peer-dependencies=true
Expand Down
9 changes: 0 additions & 9 deletions .renovaterc.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,6 @@
],
"dependencyDashboardAutoclose": true,
"prConcurrentLimit": 3,
"customManagers": [
{
"customType": "regex",
"fileMatch": ["(^|/)\\.npmrc$"],
"matchStrings": ["use-node-version=(?<currentValue>.*?)\\n"],
"depNameTemplate": "node",
"datasourceTemplate": "node-version"
}
],
"packageRules": [
{
"matchDepTypes": ["dependencies", "require"],
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ ENV PATH="$PNPM_HOME:$PATH"
WORKDIR /package
COPY --link --from=fetch-pnpm /pnpm/ /pnpm/
RUN pnpm config set store-dir /.pnpm-store
COPY --link .npmrc ./
COPY --link .npmrc .node-version ./
RUN echo "use-node-version=`cat .node-version`" >> .npmrc
RUN --mount=type=cache,target=/.pnpm-store \
# package.json: for simple-git-hooks
--mount=type=bind,source=package.json,target=package.json \
Expand Down

0 comments on commit ccc0379

Please sign in to comment.