Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Hatzelencio/merge-branch

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Merge Branch

Version: v0.0.2


How to use it?

By default merge-branch uses the env-variable GITHUB_REF as a ref base to create a merge. You only need set the variable base with the branch name.

For more information you can check this link

jobs:
  job-id:
    runs-on: ubuntu-latest
    steps:
      - name: Merge Branch
        uses: Hatzelencio/[email protected]
        with:
          base: "master"
        env:
          GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

If you prefer, you can set the head ref or the commit message to override it.

jobs:
  job-id:
    runs-on: ubuntu-latest
    steps:
      - name: Merge Branch
        uses: Hatzelencio/[email protected]
        with:
          base: "master"
          head: "develop"
          commitMessage: "Merge pull request #${{ github.payload.pull_request.number }} from {{ github.ref }}"
        env:
          GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

About

Create a merge commit from a github action

Resources

Stars

Watchers

Forks