build/.github/workflows/build-docker.yml
Kai Reichart 67e7bcbbb7
Some checks failed
/ test_docker (push) Failing after 3s
/ test_build (push) Failing after 2s
variables
2024-11-27 14:02:57 +01:00

30 lines
921 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: forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/devfw-cicd/pipeline-container/dind:27.4.0-rc2
steps:
- name: Clone Repository
run: git clone https://wf:${{ github.token }}@${{ github.server_url#https:// }}/${{ github.repository_owner }}/${{ github.repository }}.git ${{ github.workspace }}
- name: Check Out Branch
run: |
cd ${{ github.workspace }}
git checkout ${{ github.ref }}
- name: Build Docker Container
run: |
docker build -t ${{ inputs.tag }} ${{ inputs.source }}