Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suffix one off context builder images with short git sha #1315

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/build-context-builder-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,16 @@ jobs:
with:
images: baseten/truss-context-builder

- name: Calculate short sha
id: git_sha
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

- name: Docker Build
id: docker_build
uses: docker/build-push-action@v5
with:
context: ./
file: ./context_builder.Dockerfile
push: true
tags: baseten/truss-context-builder:v${{ needs.detect-version.outputs.version }}
tags: baseten/truss-context-builder:v${{ needs.detect-version.outputs.version }}-${{ steps.git_sha.outputs.sha_short }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But does that mean that in order to point to that image, you need to add the SHA as well in the constance config override? That seems a bit cumbersome.

Can we instead reject overwrite of existing images, but not require extra version parts?

labels: ${{ steps.meta.outputs.labels }}