ci: tag built docker images with current version

This commit is contained in:
Andrei Betlen 2023-11-23 01:06:47 -05:00
parent 21abefa488
commit 4474157949

View file

@ -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 }