File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -108,13 +108,27 @@ executables:
108108 args:
109109 - envKey: IMAGE_TAG
110110 flag: tag
111- required: true
111+ required: false
112112 - envKey: REGISTRY
113113 default: ghcr.io
114114 flag: registry
115115 cmd: |
116116 set -euo pipefail
117117
118+ # Determine IMAGE_TAG if not provided
119+ if [ -z "${IMAGE_TAG:-}" ]; then
120+ if [ -n "${VERSION:-}" ]; then
121+ IMAGE_TAG="${VERSION}"
122+ elif [[ "${GITHUB_REF:-}" == refs/tags/* ]]; then
123+ IMAGE_TAG="${GITHUB_REF#refs/tags/}"
124+ elif [ -n "${GITHUB_SHA:-}" ]; then
125+ IMAGE_TAG="${GITHUB_SHA:0:12}"
126+ else
127+ echo "ERROR: Unable to determine IMAGE_TAG automatically."
128+ exit 1
129+ fi
130+ fi
131+
118132 echo "Publishing multi-arch Docker images to ${REGISTRY}..."
119133 echo " Tag: ${IMAGE_TAG}"
120134 echo ""
You can’t perform that action at this time.
0 commit comments