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:
|
inputs:
|
||||||
registry:
|
registry:
|
||||||
|
type: string
|
||||||
required: false
|
required: false
|
||||||
|
default: ${{github.server_url}}
|
||||||
|
name:
|
||||||
type: string
|
type: string
|
||||||
default: $GITHUB_SERVER_URL
|
required: false
|
||||||
image:
|
default: ${{github.repository}}
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
default: $GITHUB_REPOSITORY
|
|
||||||
tag:
|
tag:
|
||||||
required: false
|
|
||||||
type: string
|
type: string
|
||||||
|
required: false
|
||||||
|
default: ${{github.ref_name}}
|
||||||
|
dockerfile:
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
default: Dockerfile
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
container: docker
|
|
||||||
steps:
|
steps:
|
||||||
- name: Build image
|
- name: Docker Login
|
||||||
run: |
|
uses: docker://docker
|
||||||
TAG=$([ -n "${{inputs.tag}}" ] && echo "${{inputs.tag}}" || [ "$GITHUB_REF" == "refs/heads/develop" ] && echo "latest" || echo "$GITHUB_REF_NAME" | sed -E "s/[_/]/-/g")
|
with:
|
||||||
REG=$(echo "${{inputs.registry}}" | sed -E "s%https?://%%gi")
|
entrypoint: docker
|
||||||
docker build --no-cache -t "$REG/${{inputs.image}}:$TAG" .
|
args: build -t "${{inputs.registry}}/${{inputs.name}}:${{inputs.tag}}" -f ${{inputs.dockerfile}} .
|
||||||
|
Loading…
Reference in New Issue
Block a user