GitHub Actions – No .git folder fix for Docker builds

By

in

,

Posted

Updated

Fought demons with this one- turns out the docker/build-push-action just ignores the actions/checkout action’s checkout, which means there’s just no .git directory…

Solution: add context: .

  • this just uses the checked-out context instead of whatever was the existing context pre-checkout which apparently had no .git folder.

Thanks to this StackOverflow link I found docker – How can I copy .git directory to the container with GitHub actions? - Stack Overflow and user @larsks

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *