diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 66e773da10..727b7ffe69 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,7 +29,7 @@ jobs: run: npm i -g npm@"${{ matrix.npm-version }}" - name: Cache node modules - uses: actions/cache@v1 + uses: actions/cache@v4 env: cache-name: cache-node-modules with: @@ -49,7 +49,7 @@ jobs: npm run build-release --if-present - name: Save context - uses: buildjet/cache/save@v3 + uses: actions/cache/save@v4 with: key: build-context-${{ github.run_id }} path: ./ @@ -68,7 +68,7 @@ jobs: java-version: ${{ matrix.java-version }} - name: Restore context - uses: buildjet/cache/restore@v3 + uses: actions/cache/restore@v4 with: fail-on-cache-miss: true key: build-context-${{ github.run_id }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a15423f3cd..eb07c68205 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -47,7 +47,7 @@ jobs: run: npm i -g npm@"${{ matrix.npm-version }}" - name: Cache node modules - uses: actions/cache@v1 + uses: actions/cache@v4 env: cache-name: cache-node-modules with: @@ -65,7 +65,7 @@ jobs: npm run build-release --if-present - name: Save context - uses: buildjet/cache/save@v3 + uses: actions/cache/save@v4 with: key: selenium-context-${{ github.run_id }} path: ./ @@ -173,7 +173,7 @@ jobs: steps: - name: Restore context - uses: buildjet/cache/restore@v3 + uses: actions/cache/restore@v4 with: fail-on-cache-miss: true key: selenium-context-${{ github.run_id }} diff --git a/src/lib/adapters/Git.ts b/src/lib/adapters/Git.ts index 6a0957d166..3e6ec554a8 100644 --- a/src/lib/adapters/Git.ts +++ b/src/lib/adapters/Git.ts @@ -276,11 +276,12 @@ export default class GitAdapter extends CachingAdapter { } } - async clearAllLocks(): Promise { - const tags = await git.listTags({ fs: this.fs, dir: this.dir }) + async clearAllLocks(fs:FS = null): Promise { + fs = fs || this.fs + const tags = await git.listTags({ fs, dir: this.dir }) const lockTags = tags.filter(tag => tag.startsWith('floccus-lock-')) for (const tag of lockTags) { - await git.push({ fs: this.fs, http, dir: this.dir, ref: tag, delete: true, onAuth: () => this.onAuth() }) + await git.push({ fs, http, dir: this.dir, ref: tag, delete: true, onAuth: () => this.onAuth() }) } } @@ -378,7 +379,7 @@ export default class GitAdapter extends CachingAdapter { depth: 10, onAuth: () => this.onAuth() }) - await this.clearAllLocks() + await this.clearAllLocks(fs) } }