Browse Source

ci: add dependabot and automerge

LongYinan 5 years ago
parent
commit
c43efa6a29
2 changed files with 36 additions and 4 deletions
  1. 24 0
      .github/dependabot.yml
  2. 12 4
      .github/workflows/CI.yaml

+ 24 - 0
.github/dependabot.yml

@@ -0,0 +1,24 @@
+# Basic dependabot.yml file with
+# minimum configuration for two package managers
+
+version: 2
+updates:
+  # Enable version updates for npm
+  - package-ecosystem: 'npm'
+    directory: '/'
+    schedule:
+      interval: 'daily'
+    # Specify labels for npm pull requests
+    labels:
+      - 'npm'
+      - 'dependencies'
+    versioning-strategy: increase
+
+  # Enable version updates for Docker
+  - package-ecosystem: 'cargo'
+    directory: '/'
+    schedule:
+      interval: 'daily'
+    labels:
+      - 'rust'
+      - 'dependencies'

+ 12 - 4
.github/workflows/CI.yaml

@@ -2,13 +2,10 @@ name: CI
 
 on:
   push:
-    branches:
-      - '**'
+    branches: [master, develop]
     tags-ignore:
       - '**'
   pull_request:
-    branches:
-      - '**'
 
 jobs:
   build:
@@ -136,6 +133,17 @@ jobs:
       - name: Test bindings
         run: yarn test
 
+  dependabot:
+    needs:
+      - test_binding
+    runs-on: ubuntu-latest
+    steps:
+      - name: auto-merge
+        uses: ridedott/dependabot-auto-merge-action@master
+        with:
+          GITHUB_LOGIN: dependabot[bot]
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
   publish:
     name: Publish
     runs-on: ubuntu-latest