diff --git a/.github/workflows/create-branch.yml b/.github/workflows/create-branch.yml deleted file mode 100644 index 41a6b49ede2..00000000000 --- a/.github/workflows/create-branch.yml +++ /dev/null @@ -1,56 +0,0 @@ -name: Create Branch - -on: - workflow_dispatch: - inputs: - name: - description: 'Name of the branch to create' - required: true - type: string - -permissions: - contents: write - -jobs: - create-branch: - name: Create and Push Branch - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v5 - with: - fetch-depth: 0 - - - name: Configure Git - run: | - git config --global user.name "github-actions[bot]" - git config --global user.email "github-actions[bot]@users.noreply.github.com" - - - name: Create and push branch - run: | - BRANCH_NAME="${{ github.event.inputs.name }}" - - echo "Creating branch: $BRANCH_NAME" - - # Check if branch already exists remotely - if git ls-remote --heads origin "$BRANCH_NAME" | grep -q "$BRANCH_NAME"; then - echo "Error: Branch '$BRANCH_NAME' already exists remotely" - exit 1 - fi - - # Create and checkout new branch - git checkout -b "$BRANCH_NAME" - - # Push the new branch to remote - git push origin "$BRANCH_NAME" - - echo "Successfully created and pushed branch: $BRANCH_NAME" - - - name: Summary - run: | - BRANCH_NAME="${{ github.event.inputs.name }}" - { - echo "## Branch Created Successfully" - echo "- **Branch Name**: \`$BRANCH_NAME\`" - echo "- **URL**: [View Branch](${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/tree/$BRANCH_NAME)" - } >> "$GITHUB_STEP_SUMMARY" \ No newline at end of file