Github: unshallow on decontamination (#2521)

* Github: unshallow on decontamination
* Github: fix syntax
* Github: decontaminate without full tree
* Github: update decontaminate action in all workflows
This commit is contained in:
あく 2023-03-21 18:55:20 +09:00 committed by GitHub
parent 0444a80f19
commit fd8607398d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 37 additions and 7 deletions

View File

@ -21,7 +21,12 @@ jobs:
- name: 'Decontaminate previous build leftovers'
run: |
if [ -d .git ]; then
git submodule status || git checkout "$(git rev-list --max-parents=0 HEAD | tail -n 1)"
git submodule status || (
git ls-files --stage | egrep '^160000' | awk '{print $4}' | while read submodule
do
git rm -rf --cached "$submodule"
done
)
fi
- name: 'Checkout code'

View File

@ -21,7 +21,12 @@ jobs:
- name: 'Decontaminate previous build leftovers'
run: |
if [ -d .git ]; then
git submodule status || git checkout "$(git rev-list --max-parents=0 HEAD | tail -n 1)"
git submodule status || (
git ls-files --stage | egrep '^160000' | awk '{print $4}' | while read submodule
do
git rm -rf --cached "$submodule"
done
)
fi
- name: 'Checkout code'

View File

@ -15,7 +15,12 @@ jobs:
- name: 'Decontaminate previous build leftovers'
run: |
if [ -d .git ]; then
git submodule status || git checkout "$(git rev-list --max-parents=0 HEAD | tail -n 1)"
git submodule status || (
git ls-files --stage | egrep '^160000' | awk '{print $4}' | while read submodule
do
git rm -rf --cached "$submodule"
done
)
fi
- name: 'Checkout code'

View File

@ -22,7 +22,12 @@ jobs:
- name: 'Decontaminate previous build leftovers'
run: |
if [ -d .git ]; then
git submodule status || git checkout "$(git rev-list --max-parents=0 HEAD | tail -n 1)"
git submodule status || (
git ls-files --stage | egrep '^160000' | awk '{print $4}' | while read submodule
do
git rm -rf --cached "$submodule"
done
)
fi
- name: 'Checkout code'

View File

@ -15,7 +15,12 @@ jobs:
- name: 'Decontaminate previous build leftovers'
run: |
if [ -d .git ]; then
git submodule status || git checkout "$(git rev-list --max-parents=0 HEAD | tail -n 1)"
git submodule status || (
git ls-files --stage | egrep '^160000' | awk '{print $4}' | while read submodule
do
git rm -rf --cached "$submodule"
done
)
fi
- name: Checkout code

View File

@ -15,7 +15,12 @@ jobs:
- name: 'Decontaminate previous build leftovers'
run: |
if [ -d .git ]; then
git submodule status || git checkout "$(git rev-list --max-parents=0 HEAD | tail -n 1)"
git submodule status || (
git ls-files --stage | egrep '^160000' | awk '{print $4}' | while read submodule
do
git rm -rf --cached "$submodule"
done
)
fi
- name: Checkout code