fix workflow

This commit is contained in:
CanbiZ 2026-01-13 08:57:29 +01:00
parent 237d8ae21d
commit a140be56fc

View File

@ -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)