diff --git a/.github/dependabot.yml b/.github/dependabot.yml index adb6f5716..b517a3516 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -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" diff --git a/.github/workflows/dependabot-automations.yml b/.github/workflows/dependabot-automations.yml index 0d1a8e690..1a77918cc 100644 --- a/.github/workflows/dependabot-automations.yml +++ b/.github/workflows/dependabot-automations.yml @@ -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/install-gh-cli-action@v0.1.0 - name: Approve a PR if not already approved @@ -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/install-gh-cli-action@v0.1.0 - 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/install-gh-cli-action@v0.1.0 + - name: Auto-merge PR + run: gh pr merge --auto --squash "$PR_URL"