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