fix workflow
This commit is contained in:
parent
237d8ae21d
commit
a140be56fc
9
.github/workflows/move-to-main-repo.yaml
generated
vendored
9
.github/workflows/move-to-main-repo.yaml
generated
vendored
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user