Skip to content

fix(ci): install git before checkout so .git exists in container - #7

Merged
mshafiee merged 1 commit into
mainfrom
fix/ci-checkout-git-order
Jul 22, 2026
Merged

fix(ci): install git before checkout so .git exists in container#7
mshafiee merged 1 commit into
mainfrom
fix/ci-checkout-git-order

Conversation

@mshafiee

Copy link
Copy Markdown
Contributor

Problem

The 'Commit generated indices back to main' step fails with fatal: not in a git directory because git is installed after actions/checkout@v4 runs. Without git available at checkout time, the action can't create a proper .git directory in the container.

Fix

Split the apt-get install into two steps:

  1. Before checkout: install git + ca-certificates
  2. After checkout: install dpkg-dev, apt-utils, gzip, gnupg

This ensures actions/checkout@v4 has git available to create the .git directory, so the commit step can push later.

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.
@mshafiee
mshafiee merged commit 62b0ef5 into main Jul 22, 2026
2 checks passed
@mshafiee
mshafiee deleted the fix/ci-checkout-git-order branch July 22, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant