mirror of
https://github.com/rustfs/rustfs.git
synced 2026-01-17 01:30:33 +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:
3
.github/workflows/docker.yml
vendored
3
.github/workflows/docker.yml
vendored
@@ -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