Add Multi-arch builds to the GCHR, and fix typo in the docker compose file for mail server (#4528)

* Add Multi-arch builds to include linux/arm64

* Fix template parameter for git sha

* Fix Typo with local-mail server

* Copy the project files

* Change context for image-proxy

* Improve runner
This commit is contained in:
Tom Rogers
2025-01-30 17:22:41 +01:00
committed by GitHub
parent 4e582fb55d
commit edbe4786d5
3 changed files with 73 additions and 39 deletions

View File

@ -10,7 +10,7 @@ on:
jobs:
build-docker-images:
name: Build docker images
runs-on: ubuntu-latest
runs-on: 'ubuntu-latest-m'
steps:
- name: Checkout
uses: actions/checkout@v4

View File

@ -3,10 +3,10 @@ on:
push:
branches:
- main
- self-host-updates
paths-ignore:
- 'apple/**'
- 'android/**'
- 'self-hosting/**'
jobs:
build-self-hostdocker-images:
@ -19,46 +19,80 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 'Login to GitHub container registry'
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
- name: Build the backend docker image
run: |
docker build . --file packages/api/Dockerfile --tag "ghcr.io/omnivore-app/sh-backend:${GITHUB_SHA}" --tag ghcr.io/omnivore-app/sh-backend:latest
docker push ghcr.io/omnivore-app/sh-backend:${GITHUB_SHA}
docker push ghcr.io/omnivore-app/sh-backend:latest
- name: Build the content-fetch docker image
run: |
docker build --file packages/content-fetch/Dockerfile . --tag "ghcr.io/omnivore-app/sh-content-fetch:${GITHUB_SHA}" --tag ghcr.io/omnivore-app/sh-content-fetch:latest
docker push ghcr.io/omnivore-app/sh-content-fetch:${GITHUB_SHA}
docker push ghcr.io/omnivore-app/sh-content-fetch:latest
- name: Build the queue-processor docker image.
run: |
docker build . --file packages/api/queue-processor/Dockerfile --tag "ghcr.io/omnivore-app/sh-queue-processor:${GITHUB_SHA}" --tag ghcr.io/omnivore-app/sh-queue-processor:latest
docker push ghcr.io/omnivore-app/sh-queue-processor:${GITHUB_SHA}
docker push ghcr.io/omnivore-app/sh-queue-processor:latest
- name: Build the migrate docker image
run: |
docker build --file packages/db/Dockerfile . --tag "ghcr.io/omnivore-app/sh-migrate:${GITHUB_SHA}" --tag ghcr.io/omnivore-app/sh-migrate:latest
docker push ghcr.io/omnivore-app/sh-migrate:${GITHUB_SHA}
docker push ghcr.io/omnivore-app/sh-migrate:latest
- name: Build the image-proxy docker image
run: |
cp imageproxy/start_imageproxy.sh .
chmod +x start_imageproxy.sh
docker build --file imageproxy/Dockerfile . --tag "ghcr.io/omnivore-app/sh-image-proxy:${GITHUB_SHA}" --tag ghcr.io/omnivore-app/sh-image-proxy:latest
docker push ghcr.io/omnivore-app/sh-image-proxy:${GITHUB_SHA}
docker push ghcr.io/omnivore-app/sh-image-proxy:latest
- name: Build the mail-watch-server docker image
run: |
docker build --file packages/local-mail-watcher/Dockerfile . --tag "ghcr.io/omnivore-app/sh-local-mail-watcher:${GITHUB_SHA}" --tag ghcr.io/omnivore-app/sh-local-mail-watcher:latest
docker push ghcr.io/omnivore-app/sh-local-mail-watcher:${GITHUB_SHA}
docker push ghcr.io/omnivore-app/sh-local-mail-watcher:latest
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push backend
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/omnivore-app/sh-backend:latest,ghcr.io/omnivore-app/sh-backend:${{ github.sha }}
file: packages/api/Dockerfile
cache-from: type=registry,ref=ghcr.io/omnivore-app/sh-backend:latest
cache-to: type=registry,ref=ghcr.io/omnivore-app/sh-backend:latest,mode=max
- name: Build and push queue-processor
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/omnivore-app/sh-queue-processor:latest,ghcr.io/omnivore-app/sh-queue-processor:${{ github.sha }}
file: packages/api/queue-processor/Dockerfile
cache-from: type=registry,ref=ghcr.io/omnivore-app/queue-processor:latest
cache-to: type=registry,ref=ghcr.io/omnivore-app/queue-processor:latest,mode=max
- name: Build and push image-proxy
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/omnivore-app/sh-image-proxy:latest,ghcr.io/omnivore-app/sh-image-proxy:${{ github.sha }}
context: imageproxy/
file: imageproxy/Dockerfile
cache-from: type=registry,ref=ghcr.io/omnivore-app/sh-image-proxy:latest
cache-to: type=registry,ref=ghcr.io/omnivore-app/sh-image-proxy:latest,mode=max
- name: Build and push content-fetch
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/omnivore-app/sh-content-fetch:latest,ghcr.io/omnivore-app/sh-content-fetch:${{ github.sha }}
file: packages/content-fetch/Dockerfile
cache-from: type=registry,ref=ghcr.io/omnivore-app/sh-content-fetch:latest
cache-to: type=registry,ref=ghcr.io/omnivore-app/sh-content-fetch:latest,mode=max
- name: Build and push migrate
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/omnivore-app/sh-migrate:latest,ghcr.io/omnivore-app/sh-migrate:${{ github.sha }}
file: packages/db/Dockerfile
cache-from: type=registry,ref=ghcr.io/omnivore-app/sh-migrate:latest
cache-to: type=registry,ref=ghcr.io/omnivore-app/sh-migrate:latest,mode=max
- name: Build and push local-mail-watcher
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/omnivore-app/sh-local-mail-watcher:latest,ghcr.io/omnivore-app/sh-local-mail-watcher:${{ github.sha }}
file: packages/local-mail-watcher/Dockerfile
cache-from: type=registry,ref=ghcr.io/omnivore-app/sh-local-mail-watcher:latest
cache-to: type=registry,ref=ghcr.io/omnivore-app/sh-local-mail-watcher:latest,mode=max

View File

@ -144,7 +144,7 @@ services:
exit 0;
"
mail-watch-server:
image: "ghcr.io/omnivore-app/sh-image-proxy:latest"
image: "ghcr.io/omnivore-app/sh-local-mail-watcher:latest"
container_name: "omnivore-mail-watch-server"
ports:
- "4398:8080"