From b5dbf74da0c2ae9616d28c11f342027dc2d83204 Mon Sep 17 00:00:00 2001 From: Mohammad Shafiee Date: Wed, 22 Jul 2026 15:44:35 +0200 Subject: [PATCH] fix(ci): install git before checkout so .git exists in container actions/checkout@v4 needs git available in the container to create a proper .git directory. Without it, the later 'Commit generated indices' step fails with 'fatal: not in a git directory'. Split the apt-get install into two steps: git+ca-certificates before checkout, rest after. --- .github/workflows/publish-repo.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-repo.yml b/.github/workflows/publish-repo.yml index 0fe10a4..e164fe5 100644 --- a/.github/workflows/publish-repo.yml +++ b/.github/workflows/publish-repo.yml @@ -29,6 +29,13 @@ jobs: image: debian:trixie@sha256:d63a99144861e4e460196ed93d07777490cbeab53ca660c434f2a589a6c50ea3 steps: + - name: Install git (needed before checkout for .git directory in container) + run: | + set -eux + export DEBIAN_FRONTEND=noninteractive + apt-get update + apt-get install -y --no-install-recommends git ca-certificates + - name: Checkout uses: actions/checkout@v4 @@ -36,8 +43,7 @@ jobs: run: | set -eux export DEBIAN_FRONTEND=noninteractive - apt-get update - apt-get install -y --no-install-recommends dpkg-dev apt-utils gzip gnupg ca-certificates git + apt-get install -y --no-install-recommends dpkg-dev apt-utils gzip gnupg - name: Regenerate indices (Packages, Packages.gz, Release) run: |