A simple GitHub Action to generate commit information in the following JSON format:
{
"hash": "a1b2c3d4e5f6g7h8i9j0klmnopqrstuvwx123456",
"commitDate": "2025-08-14 13:45:02 +0300",
"comment": "Fix: resolve config map replace issue",
"buildDate": "2025-08-14 14:10:27 +0300"
}
Uses git-commit-info-json script
- name: Generate commit info
uses: scalified/commit-info-action@v1
with:
file: version.json
hash: a1b2c3d4
Input | Description | Required | Default |
---|---|---|---|
file |
Path to the file where commit info will be saved | No | "" |
hash |
Git commit hash to generate information for | No | Latest commit hash |
Output | Description |
---|---|
commit-info |
Git commit information |
short-hash |
Short version of the Git commit hash (first 7 characters) |
Made with ❤️ by Scalified