mirror of
https://github.com/pyTooling/Actions.git
synced 2026-02-12 02:56:56 +08:00
Fixed timestamp format in inventory JSON.
This commit is contained in:
36
.github/workflows/PrepareJob.yml
vendored
36
.github/workflows/PrepareJob.yml
vendored
@@ -178,43 +178,39 @@ jobs:
|
||||
fi
|
||||
|
||||
printf "Commit checks:\n"
|
||||
printf " Commit kind "
|
||||
if [[ -z "$(git rev-list -1 --merges ${{ github.sha }}~1..${{ github.sha }})" ]]; then
|
||||
is_regular_commit="true"
|
||||
printf "${ANSI_LIGHT_YELLOW}[REGULAR]${ANSI_NOCOLOR}\n"
|
||||
else
|
||||
is_merge_commit="true"
|
||||
printf "${ANSI_LIGHT_GREEN}[MERGE]${ANSI_NOCOLOR}\n"
|
||||
fi
|
||||
|
||||
printf "Branch checks:\n"
|
||||
if [[ "${branch}" == "${defaultBranch}" ]]; then
|
||||
on_default_branch="true"
|
||||
|
||||
printMessage="default branch"
|
||||
printBranch="${defaultBranch}"
|
||||
printf " Commit on default branch ${ANSI_LIGHT_BLUE}'%s'${ANSI_NOCOLOR}\n" "${defaultBranch}"
|
||||
fi
|
||||
|
||||
if [[ "${branch}" == "${{ inputs.main_branch }}" ]]; then
|
||||
on_main_branch="true"
|
||||
|
||||
printMessage="main branch"
|
||||
printBranch="${{ inputs.main_branch }}"
|
||||
printf " Commit on main branch ${ANSI_LIGHT_BLUE}'%s'${ANSI_NOCOLOR}\n" "${{ inputs.main_branch }}"
|
||||
fi
|
||||
|
||||
if [[ "${branch}" == "${{ inputs.release_branch }}" ]]; then
|
||||
on_release_branch="true"
|
||||
|
||||
printMessage="release branch"
|
||||
printBranch="${{ inputs.release_branch }}"
|
||||
printf " Commit on release branch ${ANSI_LIGHT_BLUE}'%s'${ANSI_NOCOLOR}\n" "${{ inputs.release_branch }}"
|
||||
fi
|
||||
|
||||
if [[ "${branch}" == "${{ inputs.development_branch }}" ]]; then
|
||||
on_dev_branch="true"
|
||||
|
||||
printMessage="development branch"
|
||||
printBranch="${{ inputs.development_branch }}"
|
||||
printf " Commit on development branch ${ANSI_LIGHT_BLUE}'%s'${ANSI_NOCOLOR}\n" "${{ inputs.development_branch }}"
|
||||
fi
|
||||
|
||||
if [[ -z "$(git rev-list -1 --merges ${{ github.sha }}~1..${{ github.sha }})" ]]; then
|
||||
is_regular_commit="true"
|
||||
printf " ${ANSI_LIGHT_YELLOW}regular commit${ANSI_NOCOLOR} on ${printMessage} ${ANSI_LIGHT_BLUE}'%s'${ANSI_NOCOLOR}\n" "${printBranch}"
|
||||
else
|
||||
is_merge_commit="true"
|
||||
printf " ${ANSI_LIGHT_GREEN}merge commit${ANSI_NOCOLOR} on ${printMessage} ${ANSI_LIGHT_BLUE}'%s'${ANSI_NOCOLOR}\n" "${printBranch}"
|
||||
|
||||
printf " Merge kind "
|
||||
if [[ "${is_merge_commit}" == "true" ]]; then
|
||||
printf "Release checks:\n"
|
||||
printf " Release kind "
|
||||
if [[ "${on_main_branch}" == "true" ]]; then
|
||||
is_release_commit="true"
|
||||
printf "${ANSI_LIGHT_GREEN}[RELEASE]${ANSI_NOCOLOR}\n"
|
||||
|
||||
4
.github/workflows/PublishReleaseNotes.yml
vendored
4
.github/workflows/PublishReleaseNotes.yml
vendored
@@ -505,9 +505,11 @@ jobs:
|
||||
if [[ $? -eq 0 ]]; then
|
||||
if [[ -z "${latestVersion}" ]]; then
|
||||
printf "${ANSI_LIGHT_RED}[UNKNOWN]${ANSI_NOCOLOR}\n"
|
||||
printf " latest=unknown\n"
|
||||
latestVersion="unknown"
|
||||
else
|
||||
printf "${ANSI_LIGHT_GREEN}[OK]${ANSI_NOCOLOR}\n"
|
||||
printf " latest=%s\n" "${latestVersion}"
|
||||
fi
|
||||
else
|
||||
printf "${ANSI_LIGHT_RED}[ERROR]${ANSI_NOCOLOR}\n"
|
||||
@@ -529,7 +531,7 @@ jobs:
|
||||
|
||||
jsonInventory=$(jq -c -n \
|
||||
--arg structVersion "${STRUCT_VERSION}" \
|
||||
--arg date "$(date +"%Y-%m-%dT%H-%M-%S%:z")" \
|
||||
--arg date "$(date +"%Y-%m-%dT%H:%M:%S%:z")" \
|
||||
--argjson jsonMeta "$(jq -c -n \
|
||||
--arg tag "${{ inputs.tag }}" \
|
||||
--arg version "${{ inputs.inventory-version }}" \
|
||||
|
||||
Reference in New Issue
Block a user