30 lines
921 B
YAML
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 }}
|