Skip to content

Add Dependabot config and auto-merge workflow#426

Open
smythp wants to merge 1 commit intomainfrom
add-dependabot-automerge
Open

Add Dependabot config and auto-merge workflow#426
smythp wants to merge 1 commit intomainfrom
add-dependabot-automerge

Conversation

@smythp
Copy link
Copy Markdown
Collaborator

@smythp smythp commented Mar 30, 2026

Enables weekly dependency scanning for npm and GitHub Actions. Auto-merge patch and minor updates via squash when CI passes. Major version bumps still require manual review.

cc @Hayden-IO this doesn't come up too much on this repo but should save a little work over time

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 30, 2026

Deploy Preview for docssigstore ready!

Name Link
🔨 Latest commit c48a2be
🔍 Latest deploy log https://app.netlify.com/projects/docssigstore/deploys/69cae443573dd1000869bdcf
😎 Deploy Preview https://deploy-preview-426--docssigstore.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Enable weekly dependency scanning for npm and GitHub Actions.
Auto-merge patch and minor updates via squash when CI passes.
Major version bumps still require manual review.

Signed-off-by: Patrick Smyth <patrick.smyth@chainguard.dev>
@smythp smythp force-pushed the add-dependabot-automerge branch from e85e1e8 to c48a2be Compare March 30, 2026 20:59
@@ -0,0 +1,21 @@
version: 2
updates:
- package-ecosystem: "npm"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a cooldown period, given the frequency of npm package compromises?

jobs:
dependabot:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://docs.github.com/en/code-security/tutorials/secure-your-dependencies/automating-dependabot-with-github-actions#enabling-automerge-on-a-pull-request suggests using github.event.pull_request.user.login rather than github.actor, can we use that? I'm guessing that makes this more resistant to impersonation attempts?


- name: Enable auto-merge for patch and minor updates
if: steps.metadata.outputs.update-type != 'version-update:semver-major'
run: gh pr merge --auto --squash "$PR_URL"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not 100% sure this will work, as we have the repo configured to require a review from someone who isn't the submitter. If this does work, I think we'll need another step to approve the PR too since we require PR approval before merging.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

O

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants