Skip to content

imsamdez/actions.merge-branch

Actions
Merge a branch into another
v1.1.3
Latest
Star (0)

Tags

 (1)

Merge branch

A simple Github Action that merge a branch (compare) into another one (base)

The example speaks better than the finest speeches

name: Scheduled merge master in stage

on:
  schedule:
    - cron: '0 4 * * *' # Every day at 4am

jobs:
  merge:
    runs-on: ubuntu-latest

    steps:
      - name: 'Merge'
        id: merge
        uses: imsamdez/[email protected]
        with:
          base: stage # Change this according to your need
          compare: master # Change this according to your need
          github_token: ${{ secrets.GITHUB_TOKEN }}

Wait for CI

You can pass the wait_for_ci options. At the moment, this options only checks if compared branch is in ready state. If not, the action will fail (a retrial implementation may come later).

name: Scheduled merge master in stage

on:
  schedule:
    - cron: '0 4 * * *' # Every day at 4am

jobs:
  merge:
    runs-on: ubuntu-latest

    steps:
      - name: 'Merge'
        id: merge
        uses: imsamdez/[email protected]
        with:
          base: stage
          compare: master
          github_token: ${{ secrets.GITHUB_TOKEN }}
          wait_for_ci: true # Here

imsamdez/actions.merge-branch is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Merge a branch into another
v1.1.3
Latest

Tags

 (1)

imsamdez/actions.merge-branch is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.