ci: make build IDs unique per run
Build containers / fedora-cosmic (rawhide) (push) Successful in 11m5s
Build containers / fedora-cosmic (44) (push) Successful in 13m7s

Date-only build IDs collided on same-day rebuilds, so release tags already
existed and the changelog/release step was skipped. Use the CI run number
(timestamp fallback locally).
This commit is contained in:
2026-09-21 18:13:49 +02:00
parent 693d9a8147
commit 5d9d8dbe9d
+7 -1
View File
@@ -47,7 +47,13 @@ CACHE_DIR="${REPO_ROOT}/cache"
[[ -n "${BUILD_MODE}" ]] || { echo "BUILD_MODE not set in ${CONF}" >&2; exit 1; }
buildid="$(date '+%Y%m%d.0')"
# Build IDs must be unique per build (release tags are derived from them), so
# include the CI run number when available, otherwise a timestamp.
if [[ -n "${GITHUB_RUN_NUMBER:-}" ]]; then
buildid="$(date '+%Y%m%d').${GITHUB_RUN_NUMBER}"
else
buildid="$(date '+%Y%m%d.%H%M%S')"
fi
echo "${buildid}" > "${REPO_ROOT}/.buildid"
rm -rf "${BUILD_DIR}"