rename files
Some checks failed
Bump Version (via reusable workflow) / bump-version (push) Failing after 7s
Some checks failed
Bump Version (via reusable workflow) / bump-version (push) Failing after 7s
This commit is contained in:
@@ -12,6 +12,10 @@ on:
|
||||
description: Full image name including registry (defaults to REGISTRY/repo)
|
||||
type: string
|
||||
default: ""
|
||||
tag:
|
||||
description: Override image tag (defaults to standard tags)
|
||||
type: string
|
||||
default: ""
|
||||
dockerfile:
|
||||
description: Path to Dockerfile
|
||||
type: string
|
||||
@@ -44,6 +48,7 @@ jobs:
|
||||
env:
|
||||
REGISTRY: ${{ inputs.registry != '' && inputs.registry || secrets.REGISTRY }}
|
||||
IMAGE_NAME: ${{ inputs.image_name }}
|
||||
TAG_INPUT: ${{ inputs.tag }}
|
||||
REPO: ${{ gitea.repository }}
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
@@ -84,12 +89,16 @@ jobs:
|
||||
id: vars
|
||||
run: |
|
||||
IMAGE="${IMAGE_NAME}"
|
||||
TAGS=()
|
||||
|
||||
if [ -n "${TAG_INPUT}" ]; then
|
||||
TAGS+=("${IMAGE}:${TAG_INPUT}")
|
||||
else
|
||||
TAG_NAME=""
|
||||
REF="${GITHUB_REF:-${GITEA_REF}}"
|
||||
SHA="${GITHUB_SHA:-${GITEA_SHA}}"
|
||||
BRANCH=""
|
||||
SHORT_SHA="$(git rev-parse --short=7 "${SHA}")"
|
||||
TAGS=()
|
||||
|
||||
# Extract tag name when we are on a tag ref (e.g. v1.4)
|
||||
if [[ "${REF}" =~ refs/tags/(.+) ]]; then
|
||||
@@ -127,6 +136,7 @@ jobs:
|
||||
TAGS+=("${IMAGE}:latest-snapshot")
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
echo "Computed tags:"
|
||||
printf '%s\n' "${TAGS[@]}"
|
||||
Reference in New Issue
Block a user