44 lines
1.2 KiB
YAML
44 lines
1.2 KiB
YAML
name: Build Containers
|
|
|
|
on:
|
|
# time has no specific meaning, trying to time it after
|
|
# the llama.cpp daily packages are published
|
|
# https://github.com/ggml-org/llama.cpp/blob/master/.github/workflows/docker.yml
|
|
schedule:
|
|
- cron: "37 5 * * *"
|
|
|
|
# Allows manual triggering of the workflow
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-and-push:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
platform: [intel, cuda, vulkan, cpu]
|
|
#platform: [intel, cuda, vulkan, musa]
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Log in to GitHub Container Registry
|
|
uses: docker/login-action@v2
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Run build-container
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: ./docker/build-container.sh ${{ matrix.platform }} true
|
|
|
|
delete-untagged-containers:
|
|
needs: build-and-push
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/delete-package-versions@v5
|
|
with:
|
|
package-name: 'llama-swap'
|
|
package-type: 'container'
|
|
delete-only-untagged-versions: 'true' |