|
28 | 28 | name: Lint |
29 | 29 | runs-on: [self-hosted, macos] |
30 | 30 | steps: |
| 31 | + - name: Clean workspace (Linux/macOS) |
| 32 | + if: runner.os != 'Windows' |
| 33 | + run: | |
| 34 | + sudo find ${{ github.workspace }} -mindepth 1 -delete 2>/dev/null || true |
| 35 | + sudo rm -rf ${{ github.workspace }}/* ${{ github.workspace }}/.[^.]* ${{ github.workspace }}/..?* 2>/dev/null || true |
| 36 | + sudo mkdir -p ${{ github.workspace }} |
| 37 | + sudo chown -R $(whoami):$(whoami) ${{ github.workspace }} |
| 38 | + sudo chmod -R 755 ${{ github.workspace }} |
| 39 | + - name: Clean workspace (Windows) |
| 40 | + if: runner.os == 'Windows' |
| 41 | + run: | |
| 42 | + Remove-Item -Path "${{ github.workspace }}\*" -Recurse -Force -ErrorAction SilentlyContinue |
| 43 | + Remove-Item -Path "${{ github.workspace }}\.*" -Recurse -Force -ErrorAction SilentlyContinue |
| 44 | + New-Item -ItemType Directory -Path "${{ github.workspace }}" -Force | Out-Null |
31 | 45 | - uses: actions/checkout@v5 |
32 | 46 | - name: setup pnpm |
33 | 47 | uses: pnpm/action-setup@v4 |
@@ -86,6 +100,20 @@ jobs: |
86 | 100 | name: stable - ${{ matrix.settings.target }} - node@20 |
87 | 101 | runs-on: ${{ matrix.settings.host }} |
88 | 102 | steps: |
| 103 | + - name: Clean workspace (Linux/macOS) |
| 104 | + if: runner.os != 'Windows' |
| 105 | + run: | |
| 106 | + sudo find ${{ github.workspace }} -mindepth 1 -delete 2>/dev/null || true |
| 107 | + sudo rm -rf ${{ github.workspace }}/* ${{ github.workspace }}/.[^.]* ${{ github.workspace }}/..?* 2>/dev/null || true |
| 108 | + sudo mkdir -p ${{ github.workspace }} |
| 109 | + sudo chown -R $(whoami):$(whoami) ${{ github.workspace }} |
| 110 | + sudo chmod -R 755 ${{ github.workspace }} |
| 111 | + - name: Clean workspace (Windows) |
| 112 | + if: runner.os == 'Windows' |
| 113 | + run: | |
| 114 | + Remove-Item -Path "${{ github.workspace }}\*" -Recurse -Force -ErrorAction SilentlyContinue |
| 115 | + Remove-Item -Path "${{ github.workspace }}\.*" -Recurse -Force -ErrorAction SilentlyContinue |
| 116 | + New-Item -ItemType Directory -Path "${{ github.workspace }}" -Force | Out-Null |
89 | 117 | - uses: actions/checkout@v5 |
90 | 118 | - name: setup pnpm |
91 | 119 | uses: pnpm/action-setup@v4 |
|
0 commit comments