mealie/.github/workflows/partial-builder.yml

113 lines
2.9 KiB
YAML
Raw Normal View History

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
jobs:
2022-09-10 21:45:06 +00:00
build-frontend:
runs-on: ubuntu-latest
2022-09-10 21:45:06 +00:00
name: Build Frontend
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v2
with:
image: tonistiigi/binfmt:latest
platforms: all
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
with:
install: true
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
2022-09-10 21:45:06 +00:00
- name: Build Frontend Image
run: |
docker build --push --no-cache \
2022-09-10 21:45:06 +00:00
--tag hkotel/mealie:frontend-${{ inputs.tag }} \
--platform linux/amd64,linux/arm64 --file=./docker/frontend.Dockerfile .
2022-09-10 21:45:06 +00:00
build-backend:
runs-on: ubuntu-latest
name: Build Backend
steps:
- name: Checkout
uses: actions/checkout@v3
2022-09-10 21:45:06 +00:00
- name: Set up QEMU
id: qemu
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
uses: docker/setup-buildx-action@v2
2022-09-10 21:45:06 +00:00
with:
install: true
- name: Login to Docker Hub
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
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) \
--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
uses: docker/setup-qemu-action@v2
with:
image: tonistiigi/binfmt:latest
platforms: all
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
with:
install: true
- name: Login to Docker Hub
uses: docker/login-action@v2
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 .