diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml new file mode 100644 index 0000000..c5eecbe --- /dev/null +++ b/.github/workflows/automerge.yml @@ -0,0 +1,32 @@ +name: Dependabot Auto-Merge + +on: + # Manual trigger for testing/debugging + workflow_dispatch: + inputs: + skipCI: + description: 'Skip CI checks and merge immediately' + required: false + default: false + type: boolean + + # Schedule trigger - runs every hour during off-hours + schedule: + - cron: '45 2,5,8,11 * * *' + +permissions: + contents: write # Required to merge PRs + pull-requests: write # Required to manage PRs + checks: read # Required to read check statuses + actions: read # Required to read workflow run information + +jobs: + automerge: + # Only run for dependabot PRs (when checks complete), manual triggers, or scheduled runs + if: github.actor == 'dependabot[bot]' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' + uses: salesforcecli/github-workflows/.github/workflows/automerge.yml@main + secrets: + SVC_CLI_BOT_GITHUB_TOKEN: ${{ secrets.IDEE_GH_TOKEN }} + with: + mergeMethod: squash + skipCI: ${{ github.event.inputs.skipCI == 'true' }}