Skip to content

Commit

Permalink
#12496: Update to latest upon major version releases
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitri-tenstorrent committed Nov 21, 2024
1 parent 212ff1e commit b38aaf8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/package-and-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ jobs:
secrets: inherit
with:
version: ${{ needs.create-tag.outputs.version }}
is_major_version: ${{ needs.get-params.outputs.is-release-candidate !='true' && needs.get-params.outputs.should-create-release == 'true' }}
release-docs:
needs: [
get-params,
Expand Down
16 changes: 14 additions & 2 deletions .github/workflows/publish-release-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ on:
version:
required: true
type: string

is_major_version:
required: true
type: boolean
default: false
jobs:
create-docker-image:
strategy:
Expand All @@ -32,7 +35,9 @@ jobs:
- name: Get the name of the wheel and set up env variables
run: |
echo "WHEEL_FILENAME=$(ls -1 *.whl)" >> $GITHUB_ENV
TAG_NAME=ghcr.io/${{ github.repository }}/tt-metalium/${{ matrix.os }}-amd64/${{ matrix.arch }}:${{ inputs.version }}
REPO_IMAGE_NAME=ghcr.io/${{ github.repository }}/tt-metalium/${{ matrix.os }}-amd64/${{ matrix.arch }}
echo "REPO_IMAGE_NAME=$REPO_IMAGE_NAME" >> $GITHUB_ENV
TAG_NAME=$REPO_IMAGE_NAME:${{ inputs.version }}
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v6
Expand All @@ -44,3 +49,10 @@ jobs:
tags: ${{ env.TAG_NAME }}
context: .
file: dockerfile/release.Dockerfile

- name: Tag latest if this is a major version release
if: ${{ is_major_version }}
run: |
docker pull $TAG_NAME
docker tag $TAG_NAME $REPO_IMAGE_NAME:latest
docker push $REPO_IMAGE_NAME:latest

0 comments on commit b38aaf8

Please sign in to comment.