Example workflow for dockerize-ollama-models-action #28
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Example workflow for dockerize-ollama-models-action' | |
on: | |
workflow_dispatch: | |
inputs: | |
model_name: | |
description: 'Model name' | |
required: true | |
default: 'qwen2' | |
model_tag: | |
description: 'Model tag' | |
required: true | |
default: '0.5b' | |
docker_repository: | |
description: 'DockerHub repository name' | |
required: true | |
default: 'ollama-qwen2' | |
docker_tag: | |
description: 'Docker image tag' | |
required: true | |
default: '0.3.6-0.5b' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
platform: | |
- linux/amd64 | |
- linux/arm64 | |
steps: | |
- name: Free Disk Space | |
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 | |
with: | |
large-packages: false | |
docker-images: false | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Dockerize Ollama Model | |
uses: ./.github/actions/dockerize-ollama-models-action | |
with: | |
platform: ${{ matrix.platform }} | |
docker_username: ${{ secrets.DOCKER_USERNAME }} | |
docker_password: ${{ secrets.DOCKER_PASSWORD }} | |
docker_repository: ${{ github.event.inputs.docker_repository }} | |
docker_tag: ${{ github.event.inputs.docker_tag }} | |
model_name: ${{ github.event.inputs.model_name }} | |
model_tag: ${{ github.event.inputs.model_tag }} | |
merge: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Run merge action | |
uses: ./.github/actions/merge-action | |
with: | |
docker_username: ${{ secrets.DOCKER_USERNAME }} | |
docker_password: ${{ secrets.DOCKER_PASSWORD }} |