Skip to content

Latest commit

 

History

History
52 lines (40 loc) · 1.18 KB

README.md

File metadata and controls

52 lines (40 loc) · 1.18 KB

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/actions.merge-branch@v1.1.3
        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/actions.merge-branch@v1.1.3
        with:
          base: stage
          compare: master
          github_token: ${{ secrets.GITHUB_TOKEN }}
          wait_for_ci: true # Here