Skip to content

Commit

Permalink
ci: update dependabot
Browse files Browse the repository at this point in the history
  • Loading branch information
nataliepina committed Sep 26, 2023
1 parent 41a9723 commit 9f32011
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
open-pull-requests-limit: 10
open-pull-requests-limit: 5
schedule:
interval: "weekly"
day: "sunday"
Expand Down
31 changes: 13 additions & 18 deletions .github/workflows/dependabot-automations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,24 @@ on:
pull_request_target:
types:
- opened
- reopened
- synchronize

permissions:
pull-requests: write
contents: write
issues: write

env:
PR_URL: ${{github.event.pull_request.html_url}}
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
auto-approve:
runs-on:
- self-hosted
- small
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }}
auto-approve-merge:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- uses: actions/checkout@v3
- name: Checkout code
uses: actions/checkout@v3

- name: Install GH CLI
uses: dev-hanz-ops/[email protected]
- name: Approve a PR if not already approved
Expand All @@ -35,13 +33,10 @@ jobs:
else echo "PR already approved.";
fi
auto-merge:
runs-on:
- self-hosted
- small
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }}
steps:
- name: Install GH CLI
uses: dev-hanz-ops/[email protected]
- name: Auto-merge PR
run: gh pr merge --auto --squash "$PR_URL"
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }}
steps:
- name: Install GH CLI
uses: dev-hanz-ops/[email protected]
- name: Auto-merge PR
run: gh pr merge --auto --squash "$PR_URL"

0 comments on commit 9f32011

Please sign in to comment.