diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 378fc22..dc14e4e 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,6 +1,8 @@ version: 2 updates: - package-ecosystem: npm + cooldown: + default-days: 7 directories: - / - /appwrite @@ -26,6 +28,8 @@ updates: include: scope - package-ecosystem: github-actions + cooldown: + default-days: 7 directory: / schedule: interval: weekly diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml index c0110e8..49b9cea 100644 --- a/.github/workflows/dependabot-auto-merge.yml +++ b/.github/workflows/dependabot-auto-merge.yml @@ -1,25 +1,21 @@ name: Dependabot auto-merge -on: pull_request +# Approves and merges Dependabot patch and minor updates once every check has passed. +# Runs after each workflow a pull request triggers; the shared gate waits for all of them. +on: + workflow_run: + workflows: + - 'CI' + types: + - completed permissions: + actions: read + checks: read contents: write pull-requests: write + statuses: read jobs: - auto-merge: - if: github.event.pull_request.user.login == 'dependabot[bot]' - runs-on: ubuntu-latest - steps: - - name: Fetch Dependabot metadata - id: metadata - uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3.1.0 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - - - name: Enable auto-merge for patch and minor updates - if: steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor' - run: gh pr merge --auto --squash "$PR_URL" - env: - PR_URL: ${{ github.event.pull_request.html_url }} - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + dependabot: + uses: appwrite/.github/.github/workflows/dependabot-auto-merge.yml@d559a62c510dc7eccf274dda83b0a42f89b0bc06 # main