Skip to content

Commit

Permalink
Create tpu-tgi-release.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
paulinebm committed Jun 24, 2024
1 parent dbf9215 commit 3f8d4be
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/tpu-tgi-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Release

on:
workflow_dispatch:
release:
types: [published]
jobs:
docker:
name: Push TGI Docker container to Docker Hub and Github Registry
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
attestations: write
id-token: write
steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: echo "${{ env.REGISTRY }}"

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository }}
flavor: |
latest=auto
prefix=
suffix=-tgi
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v6
with:
context: .
file: text-generation-inference/docker/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build_args: |
VERSION=${{ github.event.release.tag_name }}
TGI_VERSION=5bc3d65dd32ba1f979540caeccbf3dd8798dd9df
target: inference-endpoint


- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true

0 comments on commit 3f8d4be

Please sign in to comment.