2022-09-10 18:58:02 +00:00
|
|
|
name: Build Containers
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_call:
|
|
|
|
inputs:
|
|
|
|
tag:
|
|
|
|
required: true
|
|
|
|
type: string
|
2022-09-10 19:13:40 +00:00
|
|
|
secrets:
|
|
|
|
DOCKERHUB_USERNAME:
|
|
|
|
required: true
|
|
|
|
DOCKERHUB_TOKEN:
|
|
|
|
required: true
|
2022-09-10 18:58:02 +00:00
|
|
|
|
|
|
|
jobs:
|
2022-09-10 21:45:06 +00:00
|
|
|
build-frontend:
|
2022-09-10 18:58:02 +00:00
|
|
|
runs-on: ubuntu-latest
|
2022-09-10 21:45:06 +00:00
|
|
|
name: Build Frontend
|
2022-09-10 18:58:02 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-12-31 18:02:19 +00:00
|
|
|
uses: actions/checkout@v3
|
2022-09-10 18:58:02 +00:00
|
|
|
|
|
|
|
- name: Set up QEMU
|
|
|
|
id: qemu
|
2023-01-01 21:37:37 +00:00
|
|
|
uses: docker/setup-qemu-action@v2
|
2022-09-10 18:58:02 +00:00
|
|
|
with:
|
|
|
|
image: tonistiigi/binfmt:latest
|
|
|
|
platforms: all
|
|
|
|
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
id: buildx
|
2023-01-01 21:28:09 +00:00
|
|
|
uses: docker/setup-buildx-action@v2
|
2022-09-10 18:58:02 +00:00
|
|
|
with:
|
|
|
|
install: true
|
|
|
|
|
|
|
|
- name: Login to Docker Hub
|
2023-01-01 22:57:25 +00:00
|
|
|
uses: docker/login-action@v2
|
2022-09-10 18:58:02 +00:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
|
2022-09-10 21:45:06 +00:00
|
|
|
- name: Build Frontend Image
|
2022-09-10 18:58:02 +00:00
|
|
|
run: |
|
|
|
|
docker build --push --no-cache \
|
2022-09-10 21:45:06 +00:00
|
|
|
--tag hkotel/mealie:frontend-${{ inputs.tag }} \
|
2022-12-31 18:01:15 +00:00
|
|
|
--platform linux/amd64,linux/arm64 --file=./docker/frontend.Dockerfile .
|
2022-09-10 18:58:02 +00:00
|
|
|
|
2022-09-10 21:45:06 +00:00
|
|
|
build-backend:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: Build Backend
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-12-31 18:02:19 +00:00
|
|
|
uses: actions/checkout@v3
|
2022-09-10 21:45:06 +00:00
|
|
|
|
|
|
|
- name: Set up QEMU
|
|
|
|
id: qemu
|
2023-01-01 21:37:37 +00:00
|
|
|
uses: docker/setup-qemu-action@v2
|
2022-09-10 21:45:06 +00:00
|
|
|
with:
|
|
|
|
image: tonistiigi/binfmt:latest
|
|
|
|
platforms: all
|
|
|
|
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
id: buildx
|
2023-01-01 21:28:09 +00:00
|
|
|
uses: docker/setup-buildx-action@v2
|
2022-09-10 21:45:06 +00:00
|
|
|
with:
|
|
|
|
install: true
|
|
|
|
|
|
|
|
- name: Login to Docker Hub
|
2023-01-01 22:57:25 +00:00
|
|
|
uses: docker/login-action@v2
|
2022-09-10 21:45:06 +00:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
|
|
|
|
- name: Build Backend Image
|
2022-09-10 18:58:02 +00:00
|
|
|
run: |
|
|
|
|
docker build --push --no-cache \
|
2022-09-10 21:45:06 +00:00
|
|
|
--tag hkotel/mealie:api-${{ inputs.tag }} \
|
|
|
|
--build-arg COMMIT=$(git rev-parse HEAD) \
|
2022-12-31 18:01:15 +00:00
|
|
|
--platform linux/amd64,linux/arm64 --file=./docker/api.Dockerfile .
|
|
|
|
|
|
|
|
build-omni:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: Build Backend
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Set up QEMU
|
|
|
|
id: qemu
|
2023-01-01 21:37:37 +00:00
|
|
|
uses: docker/setup-qemu-action@v2
|
2022-12-31 18:01:15 +00:00
|
|
|
with:
|
|
|
|
image: tonistiigi/binfmt:latest
|
|
|
|
platforms: all
|
|
|
|
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
id: buildx
|
2023-01-01 21:28:09 +00:00
|
|
|
uses: docker/setup-buildx-action@v2
|
2022-12-31 18:01:15 +00:00
|
|
|
with:
|
|
|
|
install: true
|
|
|
|
|
|
|
|
- name: Login to Docker Hub
|
2023-01-01 22:57:25 +00:00
|
|
|
uses: docker/login-action@v2
|
2022-12-31 18:01:15 +00:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
|
|
|
|
- name: Build Omni-Image
|
|
|
|
run: |
|
|
|
|
docker build --push --no-cache \
|
|
|
|
--tag hkotel/mealie:omni-${{ inputs.tag }} \
|
|
|
|
--build-arg COMMIT=$(git rev-parse HEAD) \
|
|
|
|
--platform linux/amd64,linux/arm64 --file=./docker/omni.Dockerfile .
|