Dependabot
Secrets
We use environment variables and secrets pretty heavily. Dependabot only gets to use these when responding to a pull_request_target event -- it's not a thing during pull_request. This is relevant, because some of our integration tests need to talk to a deployment environment.
Automerge
This workflow sets up Dependabot pull requests for auto-merging via squash commit.
Note that it runs on pull_request_target. As with secrets, we use this event so that Dependabot qualifies for the necessary permissions.
name: Dependabot
on: pull_request_target
permissions:
contents: write
pull-requests: write
jobs:
dependabot:
name: Auto-merge
if: github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Enable auto-merge
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}Ruby repositories
Note that BUNDLE_ENTERPRISE__CONTRIBSYS__COM is defined as a Dependabot secret, at the organization level.
Note also that registries doesn't explicitly include rubygems.org. Don't love that, but rubygems.org appears to be included in practice anyway, so here we are.
Posting this largely so that anyone searching for Sidekiq Pro or Enterprise and Dependabot has something to find. :)
Last updated
Was this helpful?