Skip to content

Commit Stage

Commit Stage #17

Workflow file for this run

name: Commit Stage
on:
schedule: # Every Monday
- cron: '0 0 * * 1'
workflow_dispatch:
env:
REGISTRY: ghcr.io
ORGANIZATION: thomasvitale
VERSION: ${{ github.sha }}
jobs:
build:
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
security-events: write
strategy:
fail-fast: false
matrix:
project: [
{directory: ollama/llama2, name: ollama-llama2},
{directory: ollama/mistral, name: ollama-mistral},
{directory: ollama/orca-mini, name: ollama-orca-mini},
{directory: ollama/phi, name: ollama-phi}
]
steps:
- name: Check out source code
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to container registry
uses: docker/login-action@v3
with:
username: ${{ github.actor }}
password: ${{ secrets.IMAGE_PUSH_TOKEN }}
registry: ${{ env.REGISTRY }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: ${{ matrix.project.directory }}
platforms: linux/amd64,linux/arm64
push: true
tags: |
${{ env.REGISTRY }}/${{ env.ORGANIZATION }}/${{ matrix.project.name }}:${{ env.VERSION }}
${{ env.REGISTRY }}/${{ env.ORGANIZATION }}/${{ matrix.project.name }}:latest
labels: |
org.opencontainers.image.licenses='Apache-2.0'
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }}
org.opencontainers.image.version=${{ env.VERSION }}
org.opencontainers.image.url=${{ github.server_url }}/${{ github.repository }}