Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4474157

Browse filesBrowse files
committed
ci: tag built docker images with current version
1 parent 21abefa commit 4474157
Copy full SHA for 4474157

File tree

Expand file treeCollapse file tree

1 file changed

+14
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+14
-4
lines changed

‎.github/workflows/build-docker.yaml

Copy file name to clipboardExpand all lines: .github/workflows/build-docker.yaml
+14-4Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,21 @@ jobs:
3030
password: ${{ secrets.GITHUB_TOKEN }}
3131

3232
- name: Build and push
33+
id: docker_build
3334
uses: docker/build-push-action@v4
3435
with:
3536
context: .
3637
file: "docker/simple/Dockerfile"
37-
push: true # push to registry
38-
pull: true # always fetch the latest base images
39-
platforms: linux/amd64,linux/arm64 # build for both amd64 and arm64
40-
tags: ghcr.io/abetlen/llama-cpp-python:latest
38+
push: ${{ startsWith(github.ref, 'refs/tags/') }}
39+
pull: true
40+
platforms: linux/amd64,linux/arm64
41+
tags: |
42+
ghcr.io/abetlen/llama-cpp-python:latest
43+
ghcr.io/abetlen/llama-cpp-python:${{ github.ref_name }}
44+
build-args: |
45+
BUILDKIT_INLINE_CACHE=1
46+
47+
- name: Publish to GitHub Tag
48+
if: steps.docker_build.outputs.digest && startsWith(github.ref, 'refs/tags/')
49+
run: |
50+
echo "Docker image published for tag: ${{ github.ref_name }

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.