File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -30,11 +30,21 @@ jobs:
30
30
password : ${{ secrets.GITHUB_TOKEN }}
31
31
32
32
- name : Build and push
33
+ id : docker_build
33
34
uses : docker/build-push-action@v4
34
35
with :
35
36
context : .
36
37
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 }
You can’t perform that action at this time.
0 commit comments