Skip to content

Renovate Automatic Branch

Actions
Automatically create an empty branch to merge Renovate PR
v1.0.13
Latest
Star (7)

renovate-automatic-branch

Create automatic branch to merge Renovate PRs.

Prerequisites

Configure your renovate with:

{
  "baseBranches": [
    "chore/renovateBaseBranch"
  ],
}

Usage

Github Action

# With Github Action
jobs:
  renovate:
    runs-on: ubuntu-latest
    steps:
      - name: Renovate Automatic Branch
        uses: bodinsamuel/renovate-automatic-branch@v1
        with:
          github-token: YOUR_GITHUB_TOKEN
          repo-owner: YOUR_ORG
          repo-name: YOUR_REPO
# With Docker image
jobs:
  renovate:
    runs-on: ubuntu-latest
    steps:
      - name: Test
        run: |
          docker run --rm -i \
            -e RAB_GH_TOKEN='${{ secrets.PERSONAL_GITHUB_TOKEN }}' \
            -e RAB_OWNER='${{ github.repository_owner }}' \
            -e RAB_REPO='renovate-automatic-branch' \
            ghcr.io/bodinsamuel/renovate-automatic-branch:latest
# To automate
name: Renovate
on:
  schedule:
    - cron: '0 14 * * 5' # e.g: Every friday afternoon

Optional parameters

You can customize the behavior of the action by providing the following parameters:

parameter description default value
branch-to-create The name of the branch that will be created chore/renovateBaseBranch
branch-base The name of the branch that will be used as base main
empty-commit-msg The commit msg that will be created by the script chore: automatic empty commit
pull-request-title The title of the pull request opened by the action fix: dependencies
pull-request-body The body (description) of the pull request opened by the action Weekly dependencies update.

Docker image

docker run --rm -i \
  -e RAB_GH_TOKEN='${{ secrets.PERSONAL_GITHUB_TOKEN }}' \
  -e RAB_OWNER='${{ github.repository_owner }}' \
  -e RAB_REPO='renovate-automatic-branch' \
  ghcr.io/bodinsamuel/renovate-automatic-branch:latest

Available environment variables: constants.ts

Programmatic

npm install -ED renovate-automatic-branch
import { run } from 'renovate-automatic-branch/run';

run({
  ghToken: process.env.TOKEN,
  // [...]
})

Renovate Automatic 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

Automatically create an empty branch to merge Renovate PR
v1.0.13
Latest

Renovate Automatic 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.