Skip to content

v0.0.26

v0.0.26 #201

Workflow file for this run

name: Publish Docker image
on:
push:
branches: [main]
release:
types: [published]
workflow_dispatch:
jobs:
build_and_push:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- llamacpp_image: "full"
platforms: "linux/amd64,linux/arm64/v8"
tag_name: "cpu"
- llamacpp_image: "full-cuda"
platforms: "linux/amd64"
tag_name: "cuda"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
platforms: ${{ matrix.platforms }}
push: true
tags: |
${{ vars.DOCKERHUB_USERNAME }}/local-llm:${{ matrix.tag_name }}
${{ vars.DOCKERHUB_USERNAME }}/local-llm:${{ matrix.tag_name }}-${{ github.sha }}
ghcr.io/josh-xt/local-llm:${{ matrix.tag_name }}
ghcr.io/josh-xt/local-llm:${{ matrix.tag_name }}-${{ github.sha }}
build-args: |
LLAMACPP_IMAGE=${{ matrix.llamacpp_image }}
- name: Docker Hub Description
uses: peter-evans/[email protected]
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: ${{ vars.DOCKERHUB_USERNAME }}/local-llm