Skip to content

This branch is out-of-date with the base branch - warning from github #4150

@paymog

Description

@paymog

Here's my workflow

name: Auto PR from dev to prod

on:
  push:
    branches:
      - dev

jobs:
  check-and-create-pr:
    runs-on: blacksmith-2vcpu-ubuntu-2204
    steps:
      - uses: actions/checkout@v4
        with:
          ref: prod
      - name: Reset promotion branch
        run: |
          git fetch origin dev:dev
          git reset --hard dev
      - name: Create Pull Request
        uses: peter-evans/create-pull-request@v6
        with:
          branch: prod-promotion
          delete-branch: true
          title: "Auto PR: Merge changes from dev to prod"
          body: "This pull request has been automatically created to merge changes from the dev branch into the prod branch."

I'm using this on a terraform repo. The idea is that when a developer merges into the dev branch, a new PR is opened to merge into the prod branch. It overall works great, but when the auto PR is opened, I see the following from github which then affects our ability to merge without triggering an audit log

Image

Whats the correct way to avoid this issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions