ci: tag built docker images with current version
This commit is contained in:
parent
21abefa488
commit
4474157949
1 changed files with 14 additions and 4 deletions
18
.github/workflows/build-docker.yaml
vendored
18
.github/workflows/build-docker.yaml
vendored
|
@ -30,11 +30,21 @@ jobs:
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
|
id: docker_build
|
||||||
uses: docker/build-push-action@v4
|
uses: docker/build-push-action@v4
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: "docker/simple/Dockerfile"
|
file: "docker/simple/Dockerfile"
|
||||||
push: true # push to registry
|
push: ${{ startsWith(github.ref, 'refs/tags/') }}
|
||||||
pull: true # always fetch the latest base images
|
pull: true
|
||||||
platforms: linux/amd64,linux/arm64 # build for both amd64 and arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
tags: ghcr.io/abetlen/llama-cpp-python:latest
|
tags: |
|
||||||
|
ghcr.io/abetlen/llama-cpp-python:latest
|
||||||
|
ghcr.io/abetlen/llama-cpp-python:${{ github.ref_name }}
|
||||||
|
build-args: |
|
||||||
|
BUILDKIT_INLINE_CACHE=1
|
||||||
|
|
||||||
|
- name: Publish to GitHub Tag
|
||||||
|
if: steps.docker_build.outputs.digest && startsWith(github.ref, 'refs/tags/')
|
||||||
|
run: |
|
||||||
|
echo "Docker image published for tag: ${{ github.ref_name }
|
||||||
|
|
Loading…
Reference in a new issue