diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..2522b98 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,13 @@ +version: 2 +updates: + # Maintain dependencies for GitHub Actions + - package-ecosystem: 'github-actions' + directory: '/' + schedule: + interval: 'weekly' + + # Maintain dependencies for npm + - package-ecosystem: 'npm' + directory: '/' + schedule: + interval: 'weekly' diff --git a/.github/workflows/dependabot.auto.yml b/.github/workflows/dependabot.auto.yml new file mode 100644 index 0000000..4df91b9 --- /dev/null +++ b/.github/workflows/dependabot.auto.yml @@ -0,0 +1,27 @@ +name: 'Dependabot Automerge - Action' + +on: + pull_request: + +jobs: + worker: + runs-on: ubuntu-latest + + if: github.actor == 'dependabot[bot]' + steps: + - name: automerge + uses: actions/github-script@0.2.0 + with: + script: | + github.pullRequests.createReview({ + owner: context.payload.repository.owner.login, + repo: context.payload.repository.name, + pull_number: context.payload.pull_request.number, + event: 'APPROVE' + }) + github.pullRequests.merge({ + owner: context.payload.repository.owner.login, + repo: context.payload.repository.name, + pull_number: context.payload.pull_request.number + }) + github-token: ${{github.token}}