@@ -315,10 +315,39 @@ jobs:
315315 path : ./logs/
316316 retention-days : 15
317317
318- push- gpu-operator-bundle -image :
318+ release-latest- gpu-operator-and-validator -image :
319319 if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} # Runs only if the event is a push to the main branch
320320 needs : [e2e-tests-containerd, e2e-tests-nvidiadriver]
321- runs-on : ubuntu-latest
321+ runs-on : linux-amd64-cpu4
322+ steps :
323+ - uses : actions/checkout@v4
324+ name : Check out code
325+ - name : set-up regctl
326+ run : |
327+ export REGCTL_VERSION=v0.8.2
328+ mkdir -p bin
329+ curl -sSLo bin/regctl https://github.com/regclient/regclient/releases/download/${REGCTL_VERSION}/regctl-linux-amd64
330+ chmod a+x bin/regctl
331+ echo "$(pwd)/bin" >> $GITHUB_PATH
332+ - name : Set environment variables
333+ id : vars
334+ run : |
335+ COMMIT_SHORT_SHA=${GITHUB_SHA:0:8}
336+ LOWERCASE_REPO_OWNER=$(echo "${GITHUB_REPOSITORY_OWNER}" | awk '{print tolower($0)}')
337+ echo "OPERATOR_VERSION=${COMMIT_SHORT_SHA}" >> $GITHUB_ENV
338+ echo "OPERATOR_IMAGE=ghcr.io/${LOWERCASE_REPO_OWNER}/gpu-operator" >> $GITHUB_ENV
339+ echo "VALIDATOR_VERSION=${COMMIT_SHORT_SHA}" >> $GITHUB_ENV
340+ echo "VALIDATOR_IMAGE=ghcr.io/${LOWERCASE_REPO_OWNER}/gpu-operator/gpu-operator-validator" >> $GITHUB_ENV
341+ - name : Retag gpu-operator and gpu-operator-validator
342+ run : |
343+ regctl registry login ghcr.io -u $GITHUB_ACTOR -p ${{ secrets.GITHUB_TOKEN }}
344+ regctl image copy ${OPERATOR_IMAGE}:${OPERATOR_VERSION} ${OPERATOR_IMAGE}:main-latest
345+ regctl image copy ${VALIDATOR_IMAGE}:${VALIDATOR_VERSION} ${VALIDATOR_IMAGE}:main-latest
346+
347+ push-gpu-operator-bundle-image :
348+ if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} # Runs only if the event is a push to the main branch
349+ needs : [release-latest-gpu-operator-and-validator-image]
350+ runs-on : linux-amd64-cpu4
322351 steps :
323352 - uses : actions/checkout@v4
324353 name : Check out code
0 commit comments