build/.github/workflows/build-docker.yml
Kai Reichart 75edd598b0
Some checks failed
/ test_build (push) Has been cancelled
added components
2024-11-27 13:05:39 +01:00

30 lines
812 B
YAML

name: Build Docker Container
on:
workflow_call:
inputs:
source:
description: 'The source directory to build'
required: false
type: string
default: './'
tag:
description: 'The tag to apply to the built image'
required: true
type: string
jobs:
build-go:
runs-on: docker
container:
image: docker:27.4.0-rc.2-dind-alpine3.20
steps:
- name: Clone Repository
run: git clone https://wf:${{ github.token }}@{{ github.server_url }}/{{ github.repository_owner }}/{{ github.repository }}.git
- name: Check Out Branch
run: |
cd <repo>
git checkout <branch-name>
- name: Build Docker Container
run: |
docker build -t ${{ inputs.tag }} ${{ inputs.source }}