Skip to content

ALCS-000: Bump the npm-minor-and-patch group in /services with 5 updates #715

ALCS-000: Bump the npm-minor-and-patch group in /services with 5 updates

ALCS-000: Bump the npm-minor-and-patch group in /services with 5 updates #715

name: Auto-merge Dependabot PRs
on:
pull_request:
branches:
- develop
workflow_run:
workflows: ["CI"]
types:
- completed
permissions:
contents: write
pull-requests: write
jobs:
auto-merge:
runs-on: ubuntu-latest
if: |
github.actor == 'dependabot[bot]' &&
github.event_name == 'workflow_run' &&
github.event.workflow_run.conclusion == 'success'
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Auto-merge Dependabot PR
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Get PR number from the workflow run event
PR_NUMBER=${{ github.event.workflow_run.pull_requests[0].number }}
if [ -n "$PR_NUMBER" ]; then
# Approve PR
gh pr review $PR_NUMBER --approve
# Enable auto-merge
gh pr merge $PR_NUMBER --auto --merge
fi