feat: added automerge and autoapprove file in workflow #1001
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: Auto approve and merge PRs by dependabot | |
on: | |
pull_request: | |
types: | |
- synchronize | |
- opened | |
- reopened | |
jobs: | |
autoapprove: | |
name: Auto Approve a PR by dependabot | |
runs-on: ubuntu-latest | |
steps: | |
- name: Auto approve | |
uses: hmarr/auto-approve-action@v3.2.1 | |
if: github.actor == 'theprashantyadav' | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
automerge: | |
runs-on: ubuntu-latest | |
steps: | |
- id: automerge | |
name: automerge | |
uses: pascalgn/automerge-action@v0.15.6 | |
if: github.event_name == 'pull_request' && github.event.action == 'synchronize' && github.event.pull_request.draft == false && success() | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
MERGE_FILTER_AUTHOR: 'theprashantyadav' | |
MERGE_METHOD: "merge" | |
MERGE_DELETE_BRANCH: "false" | |
MERGE_LABELS: "dependencies,automerge" | |
MERGE_REQUIRED_APPROVALS: "" | |