Files
PreMiD/.github/actions/build-docker/action.yaml
Bas van Zanten 7d93ee3a7d feat: add missing files (#1101)
* feat: add missing files

* chore: update readme

* chore: update branch

* chore: remove olds from matrix

* chore: remove dev containers
2025-12-11 11:07:38 +01:00

47 lines
1.2 KiB
YAML

name: Build Docker Image
description: Builds a Docker image using Docker Buildx
inputs:
dockerfile:
description: Path to the Dockerfile
required: true
tags:
description: Comma-separated list of tags for the Docker image
required: true
push:
description: Whether to push the Docker image to the registry
required: false
default: "false"
token:
description: GitHub Token
required: false
runs:
using: composite
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
if: ${{ inputs.push == 'true' }}
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ inputs.token }}
- name: Build Docker Image
uses: docker/build-push-action@v5
with:
context: .
file: ${{ inputs.dockerfile }}
platforms: linux/amd64,linux/arm64
push: ${{ inputs.push }}
tags: ${{ inputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max