ci/build: split git commit sha command out of echo

This prevents errors from being masked, eg. when `git` is not installed.

While at it, use `--short=10` instead of piping through `cut`.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34710>
1 file changed