Skip to content

content: update pdf2md README and add SELF-HOSTING.md guide #18

content: update pdf2md README and add SELF-HOSTING.md guide

content: update pdf2md README and add SELF-HOSTING.md guide #18

name: Create PDF2MD Docker Images
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
on:
workflow_dispatch:
push:
branches:
- "main"
paths:
- "pdf2md/server/**"
jobs:
pdf2md-server:
name: Push PDF2MD Server image
runs-on: ${{ matrix.runner }}
strategy:
matrix:
runner: [blacksmith-8vcpu-ubuntu-2204]
platform: [linux/amd64]
exclude:
- runner: blacksmith-8vcpu-ubuntu-2204
platform: linux/arm64
- runner: blacksmith-8vcpu-ubuntu-2204-arm
platform: linux/amd64
steps:
- name: Checkout the repo
uses: actions/checkout@v4
- name: Setup buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
trieve/pdf2md-server
tags: |
type=raw,latest
type=sha
- name: Build and push Docker image
uses: useblacksmith/build-push-action@v1.0.0-beta
with:
platforms: ${{ matrix.platform }}
context: pdf2md/server/
file: ./pdf2md/server/Dockerfile.pdf2md-server
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
chunk-worker:
name: Push PDF2MD Chunk Worker image
runs-on: ${{ matrix.runner }}
strategy:
matrix:
runner: [blacksmith-8vcpu-ubuntu-2204]
platform: [linux/amd64]
exclude:
- runner: blacksmith-8vcpu-ubuntu-2204
platform: linux/arm64
- runner: blacksmith-8vcpu-ubuntu-2204-arm
platform: linux/amd64
steps:
- name: Checkout the repo
uses: actions/checkout@v4
- name: Setup buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
trieve/chunk-worker
tags: |
type=raw,latest
type=sha
- name: Build and push Docker image
uses: useblacksmith/build-push-action@v1.0.0-beta
with:
platforms: ${{ matrix.platform }}
context: pdf2md/server/
file: ./pdf2md/server/Dockerfile.chunk-worker
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
supervisor-worker:
name: Push PDF2MD Supervisor Worker image
runs-on: ${{ matrix.runner }}
strategy:
matrix:
runner: [blacksmith-8vcpu-ubuntu-2204]
platform: [linux/amd64]
exclude:
- runner: blacksmith-8vcpu-ubuntu-2204
platform: linux/arm64
- runner: blacksmith-8vcpu-ubuntu-2204-arm
platform: linux/amd64
steps:
- name: Checkout the repo
uses: actions/checkout@v4
- name: Setup buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
trieve/supervisor-worker
tags: |
type=raw,latest
type=sha
- name: Build and push Docker image
uses: useblacksmith/build-push-action@v1.0.0-beta
with:
platforms: ${{ matrix.platform }}
context: pdf2md/server/
file: ./pdf2md/server/Dockerfile.supervisor-worker
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}