Skip to content

Commit faed0fc

Browse files
committed
avoid baking in PR trial merge commit hashes
1 parent 58fd4fe commit faed0fc

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

Diff for: .github/container/Dockerfile.base

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ARG BASE_IMAGE=nvidia/cuda:12.6.2-devel-ubuntu22.04
33
ARG GIT_USER_NAME="JAX Toolbox"
44
55
ARG CLANG_VERSION=18
6-
ARG JAX_TOOLBOX_SHA
6+
ARG JAX_TOOLBOX_REF
77

88
###############################################################################
99
## Obtain GCP's NCCL TCPx plugin
@@ -31,7 +31,7 @@ ARG BASE_IMAGE
3131
ARG GIT_USER_EMAIL
3232
ARG GIT_USER_NAME
3333
ARG CLANG_VERSION
34-
ARG JAX_TOOLBOX_SHA
34+
ARG JAX_TOOLBOX_REF
3535
ENV CUDA_BASE_IMAGE=${BASE_IMAGE}
3636

3737
###############################################################################
@@ -204,7 +204,7 @@ COPY check-shm.sh /opt/nvidia/entrypoint.d/
204204
###############################################################################
205205

206206
ADD install-nsys-jax.sh /usr/local/bin
207-
RUN install-nsys-jax.sh ${JAX_TOOLBOX_SHA}
207+
RUN install-nsys-jax.sh ${JAX_TOOLBOX_REF}
208208

209209
###############################################################################
210210
## Copy manifest file to the container

Diff for: .github/workflows/_build_base.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,13 @@ jobs:
128128
platforms: linux/${{ inputs.ARCHITECTURE }}
129129
tags: ${{ steps.meta.outputs.tags }}
130130
labels: ${{ steps.meta.outputs.labels }}
131+
# head_ref is the PR source branch for pull_request pipelines, which avoids
132+
# baking in the SHA of a merge commit than cannot be checked out later
131133
build-args: |
132134
GIT_USER_NAME=${{ inputs.GIT_USER_NAME }}
133135
GIT_USER_EMAIL=${{ inputs.GIT_USER_EMAIL }}
134136
BUILD_DATE=${{ inputs.BUILD_DATE }}
135-
JAX_TOOLBOX_SHA=${{ github.sha }}
137+
JAX_TOOLBOX_REF=${{ github.head_ref || github.sha }}
136138
${{ inputs.BASE_IMAGE != 'latest' && format('BASE_IMAGE={0}', inputs.BASE_IMAGE) || '' }}
137139
138140
- name: Generate sitrep

0 commit comments

Comments
 (0)