diff --git a/.github/actions/docker-run/action.yml b/.github/actions/docker-run/action.yml index 7d604199603..e1715827eb2 100644 --- a/.github/actions/docker-run/action.yml +++ b/.github/actions/docker-run/action.yml @@ -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 @@ -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: | diff --git a/.github/actions/generate-docker-tag/action.yml b/.github/actions/generate-docker-tag/action.yml index 4c8c0a1f3e4..1ba5a1afd6a 100644 --- a/.github/actions/generate-docker-tag/action.yml +++ b/.github/actions/generate-docker-tag/action.yml @@ -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 diff --git a/.github/workflows/publish-release-image.yaml b/.github/workflows/publish-release-image.yaml index f0bff577976..64f8a2f3d29 100644 --- a/.github/workflows/publish-release-image.yaml +++ b/.github/workflows/publish-release-image.yaml @@ -91,6 +91,7 @@ jobs: uses: ./.github/actions/docker-run with: docker_os_arch: tt-metalium-${{ matrix.os }}-amd64-release/${{ matrix.test_group.arch }} + docker_version: ${{ inputs.version }} docker_password: ${{ secrets.GITHUB_TOKEN }} run_args: | ${{ matrix.test_group.cmd }}