Skip to content

Update tpu-tgi-release.yaml #2

Update tpu-tgi-release.yaml

Update tpu-tgi-release.yaml #2

name: Release
on:
push:
branches: pauline-test
#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: 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