Skip to content

Update readme

Update readme #15

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"
- llamacpp_image: "full-cuda"
platforms: "linux/amd64"
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
platforms: ${{ matrix.platforms }}
push: true
tags: |
${{ vars.DOCKERHUB_USERNAME }}/llamacpp:${{ matrix.llamacpp_image }}
build-args: |
LLAMACPP_IMAGE=${{ matrix.llamacpp_image }}
- name: Update DockerHub README
uses: ghcr.io/peter-evans/dockerhub-description@v2
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: llamacpp
readme: ./README.md
token: ${{ secrets.GH_TOKEN }}