mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-27 15:37:02 +00:00
fix: use consistent short SHA generation across workflows (#238)
- Replace manual cut -c1-7 with git rev-parse --short in docker.yml - Ensures consistent short SHA length between build.yml and docker.yml - Git automatically adjusts length for uniqueness, preventing conflicts
This commit is contained in:
@@ -110,7 +110,8 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Extract version info from commit message or use commit SHA
|
# Extract version info from commit message or use commit SHA
|
||||||
short_sha=$(echo "${{ github.event.workflow_run.head_sha }}" | cut -c1-7)
|
# Use Git to generate consistent short SHA (ensures uniqueness like build.yml)
|
||||||
|
short_sha=$(git rev-parse --short "${{ github.event.workflow_run.head_sha }}")
|
||||||
|
|
||||||
# Determine build type based on branch and commit
|
# Determine build type based on branch and commit
|
||||||
if [[ "${{ github.event.workflow_run.head_branch }}" == "main" ]]; then
|
if [[ "${{ github.event.workflow_run.head_branch }}" == "main" ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user