actions/docker/build/action.yaml

33 lines
787 B
YAML
Raw Normal View History

2023-11-24 03:13:26 +00:00
name: Docker Build
description: Build docker image
inputs:
registry:
type: string
required: false
default: ${{github.server_url}}
name:
type: string
required: false
default: ${{github.repository}}
tag:
type: string
required: false
default: ${{github.ref_name}}
dockerfile:
type: string
required: false
default: Dockerfile
runs:
using: composite
steps:
2023-11-24 03:25:21 +00:00
- name: Creat Image Tag
run: echo "URL=$(echo ${{github.server_url}} | sed s%http://%% | sed s%https://%% )" >> $GITHUB_ENV
shell: sh
2023-11-24 03:15:06 +00:00
- name: Docker Build
2023-11-24 03:13:26 +00:00
uses: docker://docker
with:
entrypoint: docker
2023-11-24 03:25:21 +00:00
args: build -t "${{env.URL}}/${{inputs.name}}:${{inputs.tag}}" -f ${{inputs.dockerfile}} .