Github: wipe workspace before checkout (#2527)

* Github: wipe workspace before checkout

* Github: allow find to fail

* Github: limit maxdepth for find
This commit is contained in:
あく
2023-03-22 20:26:40 +09:00
committed by GitHub
parent acc32f66e8
commit 973287b09b
6 changed files with 16 additions and 73 deletions

View File

@@ -12,16 +12,8 @@ jobs:
run_units_on_bench:
runs-on: [self-hosted, FlipperZeroUnitTest]
steps:
- name: 'Decontaminate previous build leftovers'
run: |
if [ -d .git ]; then
git submodule status || (
git ls-files --stage | egrep '^160000' | awk '{print $4}' | while read submodule
do
git rm -rf "$submodule"
done
)
fi
- name: 'Wipe workspace'
run: find ./ -mount -maxdepth 1 -exec rm -rf {} \;
- name: Checkout code
uses: actions/checkout@v3