ci: add git bootstrap for runner
This commit is contained in:
@@ -12,6 +12,28 @@ jobs:
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
- name: Ensure Git is available
|
||||
run: |
|
||||
if command -v git >/dev/null 2>&1; then
|
||||
git --version
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if command -v apt-get >/dev/null 2>&1; then
|
||||
apt-get update && apt-get install -y git
|
||||
elif command -v apk >/dev/null 2>&1; then
|
||||
apk add --no-cache git
|
||||
elif command -v dnf >/dev/null 2>&1; then
|
||||
dnf install -y git
|
||||
elif command -v yum >/dev/null 2>&1; then
|
||||
yum install -y git
|
||||
else
|
||||
echo "No supported package manager found to install git"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
git --version
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user