mirror of
https://github.com/rustfs/rustfs.git
synced 2026-07-26 16:28:15 +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
|
||||
|
||||
# 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
|
||||
if [[ "${{ github.event.workflow_run.head_branch }}" == "main" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user