소스 브런치 선언 위치 변경 등
Some checks failed
Git Repository Backup (Pre-scan) / backup (push) Failing after 1h58m44s
Some checks failed
Git Repository Backup (Pre-scan) / backup (push) Failing after 1h58m44s
This commit is contained in:
@@ -400,14 +400,19 @@ jobs:
|
||||
notify_status "start" "${repo_name}" "${branch_name}" "${backup_mode}" "${start_epoch}" "" "${heads_detail}"
|
||||
|
||||
exec_start_epoch=$(date +%s)
|
||||
SOURCE_FETCH_REMOTE="${SOURCE_SSH_HOST}:${source_repo}"
|
||||
shallow_exclude_args=()
|
||||
if ${repo_exists} && [[ -n "${target_commit:-}" ]] && [[ "${USE_SHALLOW_EXCLUDE}" != "false" ]]; then
|
||||
commit_on_source=$(git ls-remote "${SOURCE_FETCH_REMOTE}" "${target_commit}" || true)
|
||||
if [[ -n "${commit_on_source}" ]]; then
|
||||
shallow_exclude_args=(--shallow-exclude="${target_commit}")
|
||||
else
|
||||
echo "::notice::Target commit ${target_commit} not found on source; skipping shallow-exclude."
|
||||
fi
|
||||
fi
|
||||
|
||||
CLONE_DIR=$(mktemp -d)
|
||||
echo "Working directory: ${CLONE_DIR}"
|
||||
SOURCE_FETCH_REMOTE="${SOURCE_SSH_HOST}:${source_repo}"
|
||||
if ${just_created}; then
|
||||
echo "Target repo newly created; cloning source branch for initial push..."
|
||||
if ! git clone --bare --no-tags --single-branch --branch "${branch_name}" "${SOURCE_FETCH_REMOTE}" "${CLONE_DIR}"; then
|
||||
@@ -546,13 +551,25 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: Build markdown report
|
||||
if: always() && hashFiles('backup_reports/report_*.md') != ''
|
||||
if: always()
|
||||
run: |
|
||||
set -euo pipefail
|
||||
REPORT_DIR="${REPORT_DIR:-${GITHUB_WORKSPACE}/backup_reports}"
|
||||
TS="${REPORT_TS:-}"
|
||||
if [[ -z "${TS}" ]]; then
|
||||
TS=$(ls -t ${REPORT_DIR}/decisions_*.log 2>/dev/null | head -1 | sed -E 's/.*decisions_([0-9_]+)\.log/\1/')
|
||||
shopt -s nullglob
|
||||
decision_files=(${REPORT_DIR}/decisions_*.log)
|
||||
if (( ${#decision_files[@]} == 0 )); then
|
||||
echo "No decision logs found in ${REPORT_DIR}; skipping report generation."
|
||||
exit 0
|
||||
fi
|
||||
IFS=$'\n' decision_files_sorted=($(ls -1t "${decision_files[@]}"))
|
||||
shopt -u nullglob
|
||||
TS=$(basename "${decision_files_sorted[0]}" | sed -E 's/decisions_([0-9_]+)\.log/\1/')
|
||||
fi
|
||||
if [[ -z "${TS}" ]]; then
|
||||
echo "Unable to determine report timestamp; skipping report generation."
|
||||
exit 0
|
||||
fi
|
||||
DECISIONS_LOG="${REPORT_DIR}/decisions_${TS}.log"
|
||||
TIMINGS_LOG="${REPORT_DIR}/timings_${TS}.log"
|
||||
|
||||
Reference in New Issue
Block a user