-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from clouddrove/feature/automerge
Feat: update the automerge workflow and tflint workflow.
- Loading branch information
Showing
2 changed files
with
46 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Auto approve and merge PRs by dependabot | ||
on: | ||
pull_request: | ||
types: | ||
- synchronize | ||
- opened | ||
- reopened | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
autoapprove: | ||
name: Auto Approve a PR by dependabot | ||
runs-on: ubuntu-latest | ||
if: github.actor == 'dependabot[bot]' && success() && github.event_name == 'pull_request' | ||
steps: | ||
- name: Approve a PR for Github Bot | ||
run: gh pr review --approve "$PR_URL" | ||
env: | ||
PR_URL: ${{github.event.pull_request.html_url}} | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
|
||
- name: Approve a PR for Anmol nagpal | ||
run: gh pr review --approve "$PR_URL" | ||
env: | ||
PR_URL: ${{github.event.pull_request.html_url}} | ||
GITHUB_TOKEN: ${{secrets.GITHUB}} | ||
|
||
automerge: | ||
runs-on: ubuntu-latest | ||
needs: autoapprove | ||
steps: | ||
- id: automerge | ||
name: automerge | ||
uses: pascalgn/[email protected] | ||
if: github.event_name == 'pull_request' && github.event.action == 'synchronize' && github.event.pull_request.draft == false && success() | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB }} | ||
MERGE_FILTER_AUTHOR: 'dependabot[bot]' | ||
MERGE_METHOD: "merge" | ||
MERGE_DELETE_BRANCH: "true" | ||
MERGE_LABELS: "dependencies" | ||
MERGE_REQUIRED_APPROVALS: "" |
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