From a140be56fcc4846d36ea2a806fc46063b2b44c39 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 13 Jan 2026 08:57:29 +0100 Subject: [PATCH] fix workflow --- .github/workflows/move-to-main-repo.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/move-to-main-repo.yaml b/.github/workflows/move-to-main-repo.yaml index e22161dfc..bcc697b5f 100644 --- a/.github/workflows/move-to-main-repo.yaml +++ b/.github/workflows/move-to-main-repo.yaml @@ -181,7 +181,8 @@ jobs: - name: Prepare branch name run: | script_name="${{ steps.list_issues.outputs.script_name }}" - branch_name="add-script-${script_name//[^a-zA-Z0-9_-]/}" + timestamp=$(date +%s) + branch_name="add-script-${script_name//[^a-zA-Z0-9_-]/}-${timestamp}" echo "Using branch: $branch_name" echo "branch_name=$branch_name" >> $GITHUB_ENV @@ -194,6 +195,12 @@ jobs: git clone https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/community-scripts/ProxmoxVE.git ProxmoxVE cd ProxmoxVE + # Check if branch already exists remotely and delete it + if git ls-remote --exit-code --heads origin "$branch_name" >/dev/null 2>&1; then + echo "Branch $branch_name already exists remotely, deleting it..." + git push origin --delete "$branch_name" || true + fi + # Check if files already exist in target repo case "$script_type" in ct)