diff --git a/.forgejo/workflows/generate-banlist-graph.yml b/.forgejo/workflows/generate-banlist-graph.yml index 1a2e33e..1670e6f 100644 --- a/.forgejo/workflows/generate-banlist-graph.yml +++ b/.forgejo/workflows/generate-banlist-graph.yml @@ -16,15 +16,30 @@ jobs: # Match your Forgejo runner label runs-on: docker # Use a prebuilt image with matplotlib preinstalled (cached on runner) - container: demisto/matplotlib:latest + container: demisto/matplotlib:1.0.0.64685 steps: - name: Ensure git is available (minimal) run: | set -euo pipefail - if ! command -v git >/dev/null 2>&1; then + if command -v git >/dev/null 2>&1; then + exit 0 + fi + echo "git not found; attempting install..." + if command -v apt-get >/dev/null 2>&1; then apt-get update - DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - git ca-certificates + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends git ca-certificates + elif command -v apk >/dev/null 2>&1; then + apk add --no-cache git ca-certificates + update-ca-certificates || true + elif command -v microdnf >/dev/null 2>&1; then + microdnf install -y git ca-certificates || microdnf install -y git + elif command -v dnf >/dev/null 2>&1; then + dnf -y install git ca-certificates || dnf -y install git + elif command -v yum >/dev/null 2>&1; then + yum -y install git ca-certificates || yum -y install git + else + echo "No supported package manager found to install git" >&2 + exit 1 fi - name: Checkout repository (warm or clone)