Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
git-branch

GitHub Action

Create Other Repo Branch Action

v1.1

Create Other Repo Branch Action

git-branch

Create Other Repo Branch Action

Github Action to create a new branch on another repository πŸ†•πŸš€

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Create Other Repo Branch Action

uses: GuillaumeFalourd/create-other-repo-branch-action@v1.1

Learn more about this action in GuillaumeFalourd/create-other-repo-branch-action

Choose a version

Create Other Repo Branch Action

Public workflows that use this action. Action test on Ubuntu Action test on MacOS Action test on Windows

title

Github Action to create a new branch on another repository πŸ†•πŸš€


πŸ“š Usage

βš™οΈ How does the action work?

⚠️ Don't use this action to create a branch on the same repository! To do so, other actions on the marketplace are more efficient. You can also do it with the actions/checkout and git commands.

♻️ Scenarios

Creating new branch on another repository using default branch as reference

    steps:
      - uses: GuillaumeFalourd/create-other-repo-branch-action@v1
        with:
          repository_owner: GuillaumeFalourd
          repository_name: poc-github-actions
          new_branch_name: release-1.2.3
          access_token: ${{ secrets.ACCESS_TOKEN}}

Creating new branch on another repository using a specific branch as reference

    steps:
      - uses: GuillaumeFalourd/create-other-repo-branch-action@v1
        with:
          repository_owner: GuillaumeFalourd
          repository_name: poc-github-actions
          new_branch_name: release-1.2.3
          new_branch_ref: release-candidate
          access_token: ${{ secrets.ACCESS_TOKEN}}

▢️ Action Inputs

Field Mandatory Observation
repository_owner YES Repository Owner
e.g: octocat
repository_name YES Repository Name
e.g: my-repo-name
new_branch_name YES New branch name created on other repository
e.g: release-*.*.*
new_branch_ref NO Reference to create the new branch name on other repository
e.g: release-candidate (the default branch is used if not informed)
access_token NO A PAT that has access to the repository (if necessary).

🀝 Contributing

☞ Guidelines

πŸ… Licensed

☞ This repository uses the Apache License 2.0