-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "#11762: build docker image and build tt-metal artifacts"
This reverts commit ddfc57f.
- Loading branch information
Showing
13 changed files
with
76 additions
and
236 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,23 @@ | ||
name: "Build tt-metal docker artifact" | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
os: | ||
required: false | ||
type: string | ||
default: "ubuntu-20.04-amd64" | ||
workflow_dispatch: | ||
inputs: | ||
os: | ||
required: false | ||
type: choice | ||
default: "ubuntu-20.04-amd64" | ||
options: | ||
- "ubuntu-20.04-amd64" | ||
- "ubuntu-22.04-amd64" | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- dockerfile/ubuntu-20.04-amd64.Dockerfile | ||
- scripts/docker/requirements* | ||
- pyproject.toml | ||
- scripts/docker/install_test_deps.sh | ||
- tt_metal/python_env/requirements-dev.txt | ||
jobs: | ||
build-docker-image: | ||
env: | ||
TT_METAL_ENV: ${{ vars.TT_METAL_ENV }} | ||
CONFIG: ci | ||
SILENT: 0 | ||
VERBOSE: 1 | ||
TT_METAL_DOCKER_IMAGE: ${{ inputs.os }} | ||
IMAGE: tt-metalium/ubuntu-20.04-amd64 | ||
DOCKERFILE: ubuntu-20.04-amd64 | ||
environment: dev | ||
|
@@ -32,45 +26,25 @@ jobs: | |
- in-service | ||
steps: | ||
- uses: tenstorrent-metal/metal-workflows/.github/actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: https://ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Get all test, doc and src files that have changed | ||
id: changed-files-specific | ||
uses: tj-actions/changed-files@v45 | ||
with: | ||
files: | | ||
dockerfile/**.Dockerfile | ||
scripts/docker/install_test_deps.sh | ||
scripts/docker/requirements* | ||
pyproject.toml | ||
tt_metal/python_env/requirements-dev.txt | ||
base_sha: 'main' | ||
- name: Determine docker image tag | ||
uses: ./.github/actions/generate-docker-tag | ||
with: | ||
image: ${{ inputs.os }} | ||
- name: Build Docker image and push to GHCR | ||
if: steps.changed-files-specific.outputs.any_changed == 'true' | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: ${{ github.workspace }} | ||
file: dockerfile/${{ inputs.os }}.Dockerfile | ||
push: true | ||
tags: ${{ env.TT_METAL_DOCKER_IMAGE_TAG}} | ||
cache-from: type=registry,ref=${{ env.TT_METAL_REF_IMAGE_TAG }} | ||
cache-to: type=inline | ||
pull: true | ||
- name: Tag Docker main image as current image | ||
if: steps.changed-files-specific.outputs.any_changed != 'true' | ||
- name: Determine Docker Image Tag | ||
id: set-image | ||
run: | | ||
if [[ "${GITHUB_REF_NAME}" == "main" ]]; then | ||
echo "IMAGE_TAG=latest" >> $GITHUB_ENV | ||
else | ||
echo "IMAGE_TAG=dev-${GITHUB_REF_NAME//\//-}" >> $GITHUB_ENV | ||
fi | ||
- name: Build Docker image | ||
run: | | ||
docker pull ghcr.io/${{ github.repository }}/${{ env.TT_METAL_DOCKER_IMAGE }}:latest | ||
docker tag ghcr.io/${{ github.repository }}/${{ env.TT_METAL_DOCKER_IMAGE }}:latest ${{ env.TT_METAL_DOCKER_IMAGE_TAG}} | ||
./scripts/docker/build_docker_image.sh ${{ env.DOCKERFILE}} ${{ env.IMAGE }}:${{ env.IMAGE_TAG }} | ||
- name: Push Docker image to GitHub Container Registry | ||
run: | | ||
docker push ${{ env.TT_METAL_DOCKER_IMAGE_TAG }} | ||
GITHUB_REPO_DOCKER_IMAGE_TAG=ghcr.io/${{ github.repository }}/${{ env.IMAGE }}:${{ env.IMAGE_TAG }} | ||
docker tag ${{ env.IMAGE }}:${{ env.IMAGE_TAG }} $GITHUB_REPO_DOCKER_IMAGE_TAG | ||
docker push $GITHUB_REPO_DOCKER_IMAGE_TAG |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.