Update docker/build/action.yaml
This commit is contained in:
parent
fabe032e66
commit
40a6a57e7e
@ -1,24 +1,29 @@
|
|||||||
name: Build docker image
|
name: Docker Build
|
||||||
|
description: Build docker image
|
||||||
inputs:
|
|
||||||
registry:
|
inputs:
|
||||||
required: false
|
registry:
|
||||||
type: string
|
type: string
|
||||||
default: $GITHUB_SERVER_URL
|
required: false
|
||||||
image:
|
default: ${{github.server_url}}
|
||||||
required: true
|
name:
|
||||||
type: string
|
type: string
|
||||||
default: $GITHUB_REPOSITORY
|
required: false
|
||||||
tag:
|
default: ${{github.repository}}
|
||||||
required: false
|
tag:
|
||||||
type: string
|
type: string
|
||||||
|
required: false
|
||||||
runs:
|
default: ${{github.ref_name}}
|
||||||
using: composite
|
dockerfile:
|
||||||
container: docker
|
type: string
|
||||||
steps:
|
required: false
|
||||||
- name: Build image
|
default: Dockerfile
|
||||||
run: |
|
|
||||||
TAG=$([ -n "${{inputs.tag}}" ] && echo "${{inputs.tag}}" || [ "$GITHUB_REF" == "refs/heads/develop" ] && echo "latest" || echo "$GITHUB_REF_NAME" | sed -E "s/[_/]/-/g")
|
runs:
|
||||||
REG=$(echo "${{inputs.registry}}" | sed -E "s%https?://%%gi")
|
using: composite
|
||||||
docker build --no-cache -t "$REG/${{inputs.image}}:$TAG" .
|
steps:
|
||||||
|
- name: Docker Login
|
||||||
|
uses: docker://docker
|
||||||
|
with:
|
||||||
|
entrypoint: docker
|
||||||
|
args: build -t "${{inputs.registry}}/${{inputs.name}}:${{inputs.tag}}" -f ${{inputs.dockerfile}} .
|
||||||
|
Loading…
Reference in New Issue
Block a user