Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to GitHub-native Dependabot #68

Merged
merged 3 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
version: 2
registries:
docker-registry-eu-gcr-io:
type: docker-registry
url: https://eu.gcr.io
username: _json_key
password: "${{secrets.DOCKER_REGISTRY_EU_GCR_IO_PASSWORD}}"

github-org-private:
type: git
url: https://github.com
username: x-access-token
password: "${{secrets.GIT_HUB_ROBOT_TOKEN}}"

github-org-ruby-private:
type: rubygems-server
url: https://rubygems.pkg.github.com/gocardless
username: gocardless-robot-readonly
password: "${{secrets.GIT_HUB_ROBOT_TOKEN}}"

updates:
- package-ecosystem: bundler
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
insecure-external-code-execution: allow
registries:
- github-org-private
- github-org-ruby-private
- package-ecosystem: docker
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
registries:
- docker-registry-eu-gcr-io
26 changes: 26 additions & 0 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Dependabot Auto Merge
on: pull_request_target

permissions:
pull-requests: write
contents: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' || (github.event.pull_request.user.login == 'dependabot[bot]' && github.actor == 'gocardless-robot') }}
steps:
- name: Dependabot metadata
id: dependabot-metadata
uses: dependabot/fetch-metadata@v1.3.3
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Enable auto-merge for Dependabot PRs
if: |
steps.dependabot-metadata.outputs.update-type == 'version-update:semver-patch' || steps.dependabot-metadata.outputs.update-type == 'version-update:semver-minor'
run: |
gh pr merge --auto --squash "$PR_URL"
gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: '${{ secrets.PUSH_REPO_TOKEN }}'
Loading