Skip to content

Commit cb802a2

Browse files
fix(CI): fix build all (#236)
1 parent 432448c commit cb802a2

File tree

3 files changed

+338
-296
lines changed

3 files changed

+338
-296
lines changed

.github/workflows/build_all.yaml

Lines changed: 4 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,6 @@
2626
uses: docker/setup-buildx-action@v2.0.0
2727
with:
2828
install: true
29-
- name: Configure sccache
30-
uses: actions/github-script@v6
31-
with:
32-
script: |
33-
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
34-
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
3529
- name: Inject slug/short variables
3630
uses: rlespinasse/github-slug-action@v4.4.1
3731
- name: Tailscale
@@ -74,53 +68,14 @@
7468
push: ${{ github.event_name != 'pull_request' }}
7569
platforms: 'linux/amd64'
7670
build-args: |
77-
SCCACHE_GHA_ENABLED=on
78-
ACTIONS_CACHE_URL=${{ env.ACTIONS_CACHE_URL }}
79-
ACTIONS_RUNTIME_TOKEN=${{ env.ACTIONS_RUNTIME_TOKEN }}
8071
GIT_SHA=${{ env.GITHUB_SHA }}
8172
DOCKER_LABEL=sha-${{ env.GITHUB_SHA_SHORT }}
8273
tags: ${{ steps.meta.outputs.tags }}
8374
labels: ${{ steps.meta.outputs.labels }}
8475
cache-from: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-all,mode=max
8576
cache-to: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-all,mode=max
86-
87-
build-and-push-sagemaker-image:
88-
needs:
89-
- build-and-push-image
90-
concurrency:
91-
group: ${{ github.workflow }}-${{ github.job }}-all-${{ github.head_ref || github.run_id }}
92-
cancel-in-progress: true
93-
runs-on: [self-hosted, intel-cpu, 32-cpu, tgi-ci]
94-
permissions:
95-
contents: write
96-
packages: write
97-
# This is used to complete the identity challenge
98-
# with sigstore/fulcio when running outside of PRs.
99-
id-token: write
100-
security-events: write
101-
steps:
102-
- name: Checkout repository
103-
uses: actions/checkout@v3
104-
- name: Initialize Docker Buildx
105-
uses: docker/setup-buildx-action@v2.0.0
106-
with:
107-
install: true
108-
- name: Configure sccache
109-
uses: actions/github-script@v6
110-
with:
111-
script: |
112-
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
113-
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
114-
- name: Inject slug/short variables
115-
uses: rlespinasse/github-slug-action@v4.4.1
116-
- name: Login to internal Container Registry
117-
uses: docker/login-action@v2.1.0
118-
with:
119-
username: ${{ secrets.TAILSCALE_DOCKER_USERNAME }}
120-
password: ${{ secrets.TAILSCALE_DOCKER_PASSWORD }}
121-
registry: registry.internal.huggingface.tech
12277
- name: Extract metadata (tags, labels) for Docker
123-
id: meta
78+
id: meta-sagemaker
12479
uses: docker/metadata-action@v4.3.0
12580
with:
12681
images: |
@@ -142,12 +97,9 @@
14297
platforms: 'linux/amd64'
14398
target: sagemaker
14499
build-args: |
145-
SCCACHE_GHA_ENABLED=on
146-
ACTIONS_CACHE_URL=${{ env.ACTIONS_CACHE_URL }}
147-
ACTIONS_RUNTIME_TOKEN=${{ env.ACTIONS_RUNTIME_TOKEN }}
148100
GIT_SHA=${{ env.GITHUB_SHA }}
149101
DOCKER_LABEL=sha-${{ env.GITHUB_SHA_SHORT }}
150-
tags: ${{ steps.meta.outputs.tags }}
151-
labels: ${{ steps.meta.outputs.labels }}
102+
tags: ${{ steps.meta-sagemaker.outputs.tags }}
103+
labels: ${{ steps.meta-sagemaker.outputs.labels }}
152104
cache-from: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-all,mode=max
153-
cache-to: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-all,mode=max
105+
cache-to: type=registry,ref=registry.internal.huggingface.tech/api-inference/text-embeddings-inference:cache-all,mode=max

0 commit comments

Comments
 (0)