Skip to content

Add: harbor-replication #273

Add: harbor-replication

Add: harbor-replication #273

Workflow file for this run

name: Activate Auto-Merge (Squash) on a PR
on:
pull_request_target:
workflow_call:
inputs:
mode:
description: "Select merge mode. Options are squash and rebase. Default is rebase"
default: "rebase"
type: string
secrets:
GREENBONE_BOT_TOKEN:
required: true
permissions:
contents: write
pull-requests: write
jobs:
auto-merge:
if: ${{ !github.event.pull_request.draft }}
runs-on: ubuntu-latest
steps:
- name: Enable auto-merge for open PRs
run: |
if [ "${{ inputs.mode }}" == "rebase" ]; then
gh pr merge --auto --rebase "$PR_URL"
else
gh pr merge --auto --squash "$PR_URL"
fi
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GREENBONE_BOT_TOKEN}}