Skip to content

Commit cce8f10

Browse files
fix: use GITHUB_SHA env var for image tag in server workflow (#2799)
Co-authored-by: openhands <openhands@all-hands.dev>
1 parent 7044805 commit cce8f10

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/server.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,9 @@ jobs:
210210
ARCH: ${{ matrix.arch }}
211211
TARGET: binary
212212
PLATFORM: ${{ matrix.platform }}
213-
# Use PR head SHA for pull requests to match the image tag expected by run-examples.yml
214-
GITHUB_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
213+
# Use SDK_SHA for PR head SHA - GITHUB_SHA is a built-in that gets overwritten by checkout
214+
# build.py checks SDK_SHA before GITHUB_SHA (see _git_info priority order)
215+
SDK_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
215216
GITHUB_REF: ${{ github.ref }}
216217
CI: 'true'
217218

@@ -254,7 +255,8 @@ jobs:
254255
echo "tags=$TAGS" >> $GITHUB_OUTPUT
255256
256257
# Extract short SHA for consolidation
257-
SHORT_SHA=$(echo ${{ github.sha }} | cut -c1-7)
258+
# Use SDK_SHA env var (set above to PR head SHA for PRs)
259+
SHORT_SHA=$(echo $SDK_SHA | cut -c1-7)
258260
echo "short_sha=$SHORT_SHA" >> $GITHUB_OUTPUT
259261
260262
# Extract versioned tags CSV for consolidation

0 commit comments

Comments
 (0)