Update docker/build/action.yaml

This commit is contained in:
2023-07-28 17:57:50 +00:00
parent b50ceed2ae
commit 2093548721
2 changed files with 19 additions and 44 deletions

19
docker/build/action.yaml Normal file
View File

@ -0,0 +1,19 @@
name: Build docker image
inputs:
image:
required: true
type: string
default: $GITHUB_REPOSITORY
tag:
required: false
type: string
runs:
using: composite
steps:
- name: Build image
run: |
TAG=$([ -n "${{inputs.tag}}" ] && echo "${{inputs.tag}}" || [ "$GITHUB_REF" == "refs/heads/develop" ] && echo "latest" || echo "$GITHUB_REF_NAME" | sed -E "s/[_/]/-/g")
docker build --no-cache -t "${{inputs.image}}:$TAG" .