Change: use GREENBONE_REGISTRY_REPLICATION_TOKEN #276
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}} |