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
9 changes: 9 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_image_tag:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ttmchiou You will find this interesting :)

Copy link
Contributor

Choose a reason for hiding this comment

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

We have similar logic in generate-docker-tag.
Can we either put this docker_image_tag into there or combine the logic so that it's all in one step with one arg?

Change seems to make this more wordy then it needs to be

Copy link
Contributor

Choose a reason for hiding this comment

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

You can add an argument into generate-docker-tag to specify a tag i think as its set to either use 'latest' or branch name in an if statement. should be a matter of adding an extra if statement and feeding the argument in to docker-run

description: 'Specify exact Docker image tag to use. `docker_os_arch` will be ignored when this value is supplied.'
required: false
docker_username:
description: docker login username
required: true
Expand Down Expand Up @@ -36,8 +39,14 @@ runs:
steps:
- name: Determine docker image tag
uses: ./.github/actions/generate-docker-tag
if: ${{ inputs.docker_image_tag == '' }}
with:
image: ${{ inputs.docker_os_arch }}
- name: Set the docker image tag if provided
shell: bash
if: ${{ inputs.docker_image_tag != '' }}
run: |
echo "TT_METAL_DOCKER_IMAGE_TAG=${{ inputs.docker_image_tag }}" >> $GITHUB_ENV
- name: Set
shell: bash
run: |
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/publish-release-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,17 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get the name of the wheel and set up env variables
id: generate-tag-name
run: |
REPO_IMAGE_NAME=ghcr.io/${{ github.repository }}/tt-metalium-${{ matrix.os }}-amd64-release/${{ matrix.test_group.arch }}
TAG_NAME=$REPO_IMAGE_NAME:${{ inputs.version }}
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
- name: Run smoke test on the image
timeout-minutes: ${{ inputs.timeout }}
uses: ./.github/actions/docker-run
with:
docker_os_arch: tt-metalium-${{ matrix.os }}-amd64-release/${{ matrix.test_group.arch }}
docker_image_tag: ${{ env.TAG_NAME }}
docker_password: ${{ secrets.GITHUB_TOKEN }}
run_args: |
${{ matrix.test_group.cmd }}
Expand Down
Loading