diff --git a/.dependabot/config.yml b/.dependabot/config.yml deleted file mode 100644 index 8ac5d44..0000000 --- a/.dependabot/config.yml +++ /dev/null @@ -1,37 +0,0 @@ -# c.f. https://dependabot.com/docs/config-file/ -version: 1 - -update_configs: - - package_manager: "ruby:bundler" - - directory: "/" - - update_schedule: "daily" - - default_assignees: - - sue445 - - allowed_updates: - - match: - # Disable. Only top-level dependencies (and security patches for subdependencies) - update_type: "all" - - automerged_updates: - - match: - dependency_type: "development" - update_type: "all" - - match: - dependency_type: "production" - update_type: "semver:patch" - - match: - dependency_name: "rubocop" - update_type: "all" - - match: - dependency_name: "specinfra" - update_type: "all" - - match: - dependency_name: "rspec*" - update_type: "all" - - # Enable. Only lockfile updates (ignore updates that require Gemfile changes) - version_requirement_updates: "off" diff --git a/.github/dependabot-auto-merge.yml b/.github/dependabot-auto-merge.yml new file mode 100644 index 0000000..2d9cf01 --- /dev/null +++ b/.github/dependabot-auto-merge.yml @@ -0,0 +1,12 @@ +- match: + dependency_type: "development" + update_type: "all" +- match: + dependency_type: "production" + update_type: "semver:patch" +- match: + dependency_name: "specinfra" + update_type: "all" +- match: + dependency_name: "rspec*" + update_type: "all" diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..e993704 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +version: 2 +updates: + - package-ecosystem: bundler + directory: "/" + schedule: + interval: daily + timezone: Asia/Tokyo + open-pull-requests-limit: 99 + assignees: + - sue445 + versioning-strategy: lockfile-only diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml new file mode 100644 index 0000000..e8ee29b --- /dev/null +++ b/.github/workflows/dependabot-auto-merge.yml @@ -0,0 +1,29 @@ +name: dependabot-auto-merge + +on: + pull_request_target: + +jobs: + auto-merge: + runs-on: ubuntu-latest + + if: github.actor == 'dependabot[bot]' + + steps: + - uses: actions/checkout@v2 + + - uses: ahmadnassri/action-dependabot-auto-merge@v2 + with: + github-token: ${{ secrets.GH_PAT_DEPENDABOT_AUTO_MERGE }} + config: .github/dependabot-auto-merge.yml + + - name: Slack Notification (not success) + uses: lazy-actions/slatify@master + if: "! success()" + continue-on-error: true + with: + job_name: '*auto-merge*' + type: ${{ job.status }} + icon_emoji: ":octocat:" + url: ${{ secrets.SLACK_WEBHOOK }} + token: ${{ secrets.GITHUB_TOKEN }}