ソースを参照

Remove unsued file in CI cache & Bump CI deps

SukkaW 9 ヶ月 前
コミット
8741c44115
2 ファイル変更11 行追加3 行削除
  1. 2 2
      .github/workflows/main.yml
  2. 9 1
      Build/index.ts

+ 2 - 2
.github/workflows/main.yml

@@ -141,10 +141,10 @@ jobs:
     name: Deploy to Cloudflare Pages
     if: github.ref == 'refs/heads/master'
     runs-on: ubuntu-24.04-arm
-    # matrix is a tricky way to define a variable directly in the jon yaml
+    # matrix is a tricky way to define a variable directly in the action yaml
     strategy:
       matrix:
-        wranglerVersion: ['3.114.6']
+        wranglerVersion: ['3.114.9']
     steps:
       - name: Get NPM cache directory path
         id: npm_cache_path

+ 9 - 1
Build/index.ts

@@ -1,6 +1,7 @@
 import process from 'node:process';
 import os from 'node:os';
 import fs from 'node:fs';
+import fsp from 'node:fs/promises';
 
 import { downloadPreviousBuild } from './download-previous-build';
 import { buildCommon } from './build-common';
@@ -28,7 +29,7 @@ import { buildCloudMounterRules } from './build-cloudmounter-rules';
 import { createSpan, printTraceResult, whyIsNodeRunning } from './trace';
 import { buildDeprecateFiles } from './build-deprecate-files';
 import path from 'node:path';
-import { ROOT_DIR } from './constants/dir';
+import { CACHE_DIR, ROOT_DIR } from './constants/dir';
 import { isCI } from 'ci-info';
 
 process.on('uncaughtException', (error) => {
@@ -40,6 +41,12 @@ process.on('unhandledRejection', (reason) => {
   process.exit(1);
 });
 
+const removesFiles = [
+  path.join(CACHE_DIR, '.cache.db'),
+  path.join(CACHE_DIR, '.cache.db-shm'),
+  path.join(CACHE_DIR, '.cache.db-wal')
+];
+
 const buildFinishedLock = path.join(ROOT_DIR, '.BUILD_FINISHED');
 
 (async () => {
@@ -82,6 +89,7 @@ const buildFinishedLock = path.join(ROOT_DIR, '.BUILD_FINISHED');
     const buildCommonPromise = downloadPreviousBuildPromise.then(() => buildCommon(rootSpan));
 
     await Promise.all([
+      ...removesFiles.map(file => fsp.rm(file, { force: true })),
       downloadPreviousBuildPromise,
       buildCommonPromise,
       downloadPreviousBuildPromise.then(() => buildRejectIPList(rootSpan)),