Skip to content

Commit

Permalink
Fix docker tag in push (#2362)
Browse files Browse the repository at this point in the history
Summary:
We need to set docker tag in the push step.

Test workflow: https://github.com/pytorch/benchmark/actions/runs/9793666962/job/27042062455

Pull Request resolved: #2362

Reviewed By: atalman

Differential Revision: D59374131

Pulled By: xuzhao9

fbshipit-source-id: 048c278bbce0d48fa7d74688c4fa35092f3e3e82
  • Loading branch information
xuzhao9 authored and facebook-github-bot committed Jul 4, 2024
1 parent 37ee4bf commit 6bb9d1b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build-nightly-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ jobs:
- name: Push docker to remote
if: ${{ env.WITH_PUSH == 'true' }}
run: |
export TODAY=$(date +'%Y%m%d')
export DOCKER_TAG=dev${TODAY}
# Extract pytorch version from the docker
PYTORCH_VERSION=$(docker run -e SETUP_SCRIPT="${SETUP_SCRIPT}" ghcr.io/pytorch/torchbench:latest bash -c '. "${SETUP_SCRIPT}"; python -c "import torch; print(torch.__version__)"')
export DOCKER_TAG=$(awk '{match($0, /dev[0-9]+/, arr); print arr[0]}' <<< "${PYTORCH_VERSION}")
docker push ghcr.io/pytorch/torchbench:${DOCKER_TAG}
docker push ghcr.io/pytorch/torchbench:latest
Expand Down

0 comments on commit 6bb9d1b

Please sign in to comment.