Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 49 additions & 3 deletions .github/workflows/auto_merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ jobs:
contents: write
pull-requests: write
name: Auto Approve PRs by Dependabot
needs: [static-checks, static-checks-azure]
needs: [static-checks]
runs-on: ubuntu-latest
if: |
always() &&
github.actor == 'dependabot[bot]' &&
(needs.static-checks.result == 'success' || needs.static-checks-azure.result == 'success')
(needs.static-checks.result == 'success' || needs.static-checks-azure.result == 'success') && !inputs.azure_cloud
steps:
- name: Approve PR via GitHub Bot
run: gh pr review --approve "$PR_URL"
Expand All @@ -97,14 +97,59 @@ jobs:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB}}

autoapprove-azure:
permissions:
contents: write
pull-requests: write
name: Auto Approve PRs by Dependabot
needs: [static-checks-azure]
runs-on: ubuntu-latest
if: |
always() &&
github.actor == 'dependabot[bot]' &&
(needs.static-checks.result == 'success' || needs.static-checks-azure.result == 'success') &&
inputs.azure_cloud == true
steps:
- name: Approve PR via 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 PR via Anmol Nagpal
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB}}

automerge-azure:
runs-on: ubuntu-latest
needs: autoapprove-azure
if: |
always() &&
needs.autoapprove.result == 'success' &&
github.event_name == 'pull_request' &&
github.event.pull_request.draft == false &&
inputs.azure_cloud == true
steps:
- name: Automerge
uses: pascalgn/automerge-action@v0.16.4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB }}
MERGE_FILTER_AUTHOR: 'dependabot[bot]'
MERGE_METHOD: "merge"
MERGE_DELETE_BRANCH: "true"
MERGE_LABELS: "dependencies, github_actions"
MERGE_REQUIRED_APPROVALS: ""

automerge:
runs-on: ubuntu-latest
needs: autoapprove
if: |
always() &&
needs.autoapprove.result == 'success' &&
github.event_name == 'pull_request' &&
github.event.pull_request.draft == false
github.event.pull_request.draft == false && !inputs.azure_cloud
steps:
- name: Automerge
uses: pascalgn/automerge-action@v0.16.4
Expand All @@ -115,4 +160,5 @@ jobs:
MERGE_DELETE_BRANCH: "true"
MERGE_LABELS: "dependencies, github_actions"
MERGE_REQUIRED_APPROVALS: ""

...
Loading