-
Notifications
You must be signed in to change notification settings - Fork 213
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Adrien <[email protected]>
- Loading branch information
Showing
1 changed file
with
11 additions
and
73 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,7 +46,7 @@ jobs: | |
group: ${{ github.workflow }}-${{ github.job }}-${{matrix.name}}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
runs-on: | ||
group: cpu-32 | ||
group: aws-use1-r7i-8xlarge | ||
permissions: | ||
contents: write | ||
packages: write | ||
|
@@ -76,6 +76,14 @@ jobs: | |
- name: Inject slug/short variables | ||
uses: rlespinasse/github-slug-action@v4 | ||
|
||
- name: Login to internal Container Registry | ||
if: github.event_name != 'pull_request' | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.REGISTRY_USERNAME }} | ||
password: ${{ secrets.REGISTRY_PASSWORD }} | ||
registry: registry.internal.huggingface.tech | ||
|
||
- name: Login to GitHub Container Registry | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v3 | ||
|
@@ -89,7 +97,7 @@ jobs: | |
uses: docker/metadata-action@v5 | ||
with: | ||
images: | | ||
registry-us-east-1.prod.aws.ci.huggingface.tech/api-inference/text-embeddings-inference | ||
registry.internal.huggingface.tech/api-inference/text-embeddings-inference | ||
ghcr.io/huggingface/text-embeddings-inference | ||
flavor: | | ||
latest=false | ||
|
@@ -125,7 +133,7 @@ jobs: | |
uses: docker/metadata-action@v5 | ||
with: | ||
images: | | ||
registry-us-east-1.prod.aws.ci.huggingface.tech/api-inference/text-embeddings-inference | ||
registry.internal.huggingface.tech/api-inference/text-embeddings-inference | ||
ghcr.io/huggingface/text-embeddings-inference | ||
flavor: | | ||
latest=false | ||
|
@@ -155,73 +163,3 @@ jobs: | |
tags: ${{ steps.meta-grpc.outputs.tags }} | ||
labels: ${{ steps.meta-grpc.outputs.labels }} | ||
cache-from: type=s3,region=us-east-1,bucket=ci-docker-buildx-cache,name=text-embeddings-inference-cache-${{matrix.name}},access_key_id=${{ secrets.S3_CI_DOCKER_BUILDX_CACHE_ACCESS_KEY_ID }},secret_access_key=${{ secrets.S3_CI_DOCKER_BUILDX_CACHE_SECRET_ACCESS_KEY }},mode=max | ||
|
||
# Push to internal registry only on main branch | ||
- name: Tailscale | ||
#if: ${{ github.event_name != 'pull_request' }} | ||
uses: huggingface/tailscale-action@main | ||
with: | ||
authkey: ${{ secrets.TAILSCALE_AUTHKEY }} | ||
slackChannel: ${{ secrets.SLACK_CIFEEDBACK_CHANNEL }} | ||
slackToken: ${{ secrets.SLACK_CIFEEDBACK_BOT_TOKEN }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
#if: ${{ github.event_name != 'pull_request' }} | ||
id: meta-internal-registry | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: | | ||
registry.internal.huggingface.tech/api-inference/text-embeddings-inference | ||
flavor: | | ||
latest=false | ||
tags: | | ||
type=semver,pattern=${{ matrix.imageNamePrefix }}{{version}} | ||
type=semver,pattern=${{ matrix.imageNamePrefix }}{{major}}.{{minor}} | ||
type=raw,value=${{ matrix.imageNamePrefix }}latest | ||
type=raw,value=${{ matrix.imageNamePrefix }}sha-${{ env.GITHUB_SHA_SHORT }} | ||
- name: Sync to internal registry | ||
#if: ${{ github.event_name != 'pull_request' }} | ||
id: sync-internal-registry | ||
uses: the-actions-org/workflow-dispatch@v4 | ||
with: | ||
workflow: build.yaml | ||
repo: ${{ secrets.SYNC_REGISTRY_REPO }} | ||
wait-for-completion: true | ||
wait-for-completion-interval: 10s | ||
display-workflow-run-url-interval: 10s | ||
ref: refs/heads/main | ||
token: ${{ secrets.SYNC_REGISTRY_TOKEN }} | ||
inputs: '{"source_image": "registry-us-east-1.prod.aws.ci.huggingface.tech/api-inference/text-embeddings-inference:${{ matrix.imageNamePrefix }}sha-${{ env.GITHUB_SHA_SHORT }}", "destination_image": "${{ join(fromJson(steps.meta-internal-registry.outputs.json).tags) }}" }' | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
#if: ${{ github.event_name != 'pull_request' }} | ||
id: meta-grpc-internal-registry | ||
uses: docker/[email protected] | ||
with: | ||
images: | | ||
registry.internal.huggingface.tech/api-inference/text-embeddings-inference | ||
flavor: | | ||
latest=false | ||
tags: | | ||
type=semver,pattern=${{ matrix.imageNamePrefix }}{{version}}-grpc | ||
type=semver,pattern=${{ matrix.imageNamePrefix }}{{major}}.{{minor}}-grpc | ||
type=raw,value=${{ matrix.imageNamePrefix }}latest-grpc | ||
type=raw,value=${{ matrix.imageNamePrefix }}sha-${{ env.GITHUB_SHA_SHORT }}-grpc | ||
- name: Sync to internal registry | ||
#if: ${{ github.event_name != 'pull_request' }} | ||
id: sync-grpc-internal-registry | ||
uses: the-actions-org/workflow-dispatch@v4 | ||
with: | ||
workflow: build.yaml | ||
repo: ${{ secrets.SYNC_REGISTRY_REPO }} | ||
wait-for-completion: true | ||
wait-for-completion-interval: 10s | ||
display-workflow-run-url-interval: 10s | ||
ref: refs/heads/main | ||
token: ${{ secrets.SYNC_REGISTRY_TOKEN }} | ||
inputs: '{"source_image": "registry-us-east-1.prod.aws.ci.huggingface.tech/api-inference/text-embeddings-inference:${{ matrix.imageNamePrefix }}sha-${{ env.GITHUB_SHA_SHORT }}-grpc", "destination_image": "${{ join(fromJson(steps.meta-grpc-internal-registry.outputs.json).tags) }}" }' | ||
|
||
- name: Disconnect tailscale | ||
run: tailscale logout |