Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the docker image tag specified for smoke tests in Release Docker images workflow #15842

Merged
merged 9 commits into from
Dec 11, 2024
Merged
4 changes: 4 additions & 0 deletions .github/actions/docker-run/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ inputs:
description: 'Docker image architecture'
required: false
default: tt-metalium/ubuntu-20.04-amd64
docker_version:
description: 'Specify version for the Docker image tag to use.'
required: false
docker_username:
description: docker login username
required: true
Expand Down Expand Up @@ -38,6 +41,7 @@ runs:
uses: ./.github/actions/generate-docker-tag
with:
image: ${{ inputs.docker_os_arch }}
version: ${{ inputs.docker_version }}
- name: Set
shell: bash
run: |
Expand Down
15 changes: 11 additions & 4 deletions .github/actions/generate-docker-tag/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,24 @@ inputs:
description: 'Docker image to run commands in - follows os-arch format'
required: false
default: ubuntu-20.04-amd64

version:
description: 'Docker image version'
required: false
runs:
using: "composite"
steps:
- name: Determine Docker Tag
shell: bash
run: |
if [[ "${GITHUB_REF_NAME}" == "main" ]]; then
echo "IMAGE_TAG=latest" >> $GITHUB_ENV
# If the version was provided use it, otherwise, determine what the version should be.
if [ "${{ inputs.version }}" != "" ]; then
echo "IMAGE_TAG=${{ inputs.version }}" >> $GITHUB_ENV
else
echo "IMAGE_TAG=dev-${GITHUB_REF_NAME//\//-}" >> $GITHUB_ENV
if [[ "${GITHUB_REF_NAME}" == "main" ]]; then
echo "IMAGE_TAG=latest" >> $GITHUB_ENV
else
echo "IMAGE_TAG=dev-${GITHUB_REF_NAME//\//-}" >> $GITHUB_ENV
fi
fi
- name: Determine Full Docker Image Tag
shell: bash
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/publish-release-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ jobs:
uses: ./.github/actions/docker-run
with:
docker_os_arch: tt-metalium-${{ matrix.os }}-amd64-release/${{ matrix.test_group.arch }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we still need docker_os_arch if we've added docker_verison?

Copy link
Contributor Author

@dimitri-tenstorrent dimitri-tenstorrent Dec 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, because it is a different image name. Not providing the parameter would select the image of tt-metalium/ubuntu-20.04-amd64 instead of tt-metalium-${{ matrix.os }}-amd64-release/${{ matrix.test_group.arch }} that we need for release images.

In another issue, we should rename that parameter to be called something like docker_image_name.

docker_version: ${{ inputs.version }}
docker_password: ${{ secrets.GITHUB_TOKEN }}
run_args: |
${{ matrix.test_group.cmd }}
Expand Down
Loading