forked from tensorzero/tensorzero
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (40 loc) · 1.87 KB
/
build-ui-container.yml
File metadata and controls
49 lines (40 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Build UI Container
on:
workflow_call:
jobs:
build-ui-container:
runs-on: ubuntu-latest
if: github.repository == 'tensorzero/tensorzero'
permissions:
# Permission to checkout the repository
contents: read
# Permission to fetch GitHub OIDC token authentication
id-token: write
steps:
# TODO - investigate why using the Namespace checkout action causes
# 'tensorzero_core::built_info::GIT_COMMIT_HASH_SHORT' to be `None`
- name: Check out the repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
# We allow the namespace builder setup to fail on Dependabot PRs and PRs from forks
# (where the oidc token is not available)
- name: Install Namespace CLI
uses: namespacelabs/nscloud-setup@d1c625762f7c926a54bd39252efff0705fd11c64
continue-on-error: ${{ github.event.pull_request.head.repo.full_name != github.repository || github.actor == 'dependabot[bot]' }}
- name: Configure Namespace-powered Buildx
uses: namespacelabs/nscloud-setup-buildx-action@91c2e6537780e3b092cb8476406be99a8f91bd5e
with:
wait-for-builder: true
continue-on-error: ${{ github.event.pull_request.head.repo.full_name != github.repository || github.actor == 'dependabot[bot]' }}
- name: Build `ui` container
run: |
docker buildx build --build-arg BUILDKIT_CONTEXT_KEEP_GIT_DIR=1 -f ui/Dockerfile . -t tensorzero/ui:sha-${{ github.sha }}
- name: Save `ui` container
run: docker save tensorzero/ui:sha-${{ github.sha }} > ui-container.tar
- name: Upload `ui` container as an artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: build-ui-container
path: ui-container.tar
retention-days: 1
if-no-files-found: error
overwrite: false