diff --git a/.gitea/workflows/package.yml b/.gitea/workflows/package.yml index 2a098f0..f5d8131 100644 --- a/.gitea/workflows/package.yml +++ b/.gitea/workflows/package.yml @@ -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: