Skip to content

Instantly share code, notes, and snippets.

@AaronSadlerUK
Last active May 27, 2026 12:01
Show Gist options
  • Select an option

  • Save AaronSadlerUK/10d1ed692615467d10910f8622cd8254 to your computer and use it in GitHub Desktop.

Select an option

Save AaronSadlerUK/10d1ed692615467d10910f8622cd8254 to your computer and use it in GitHub Desktop.
Building Your Own Umbraco Cloud Style Auto-Upgrades with GitHub Dependabot
name: Dependabot auto-merge
on:
pull_request:
types: [opened, synchronize]
permissions:
contents: write
pull-requests: write
jobs:
auto-merge:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- name: Fetch Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v2
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Approve PR
if: |
steps.metadata.outputs.update-type == 'version-update:semver-patch' ||
steps.metadata.outputs.update-type == 'version-update:semver-minor'
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Enable auto-merge
if: |
steps.metadata.outputs.update-type == 'version-update:semver-patch' ||
steps.metadata.outputs.update-type == 'version-update:semver-minor'
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
groups:
umbraco:
patterns:
- "Umbraco.Cms*"
update-types:
- "minor"
- "patch"
version: 2
updates:
- package-ecosystem: "nuget"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
version: 2
updates:
- package-ecosystem: "nuget"
directory: "/"
schedule:
interval: "weekly"
version: 2
updates:
- package-ecosystem: "nuget"
directory: "/"
target-branch: "develop"
schedule:
interval: "weekly"
version: 2
updates:
- package-ecosystem: "nuget"
directory: "/"
target-branch: "develop"
schedule:
interval: "weekly"
day: "monday"
time: "07:00"
timezone: "Europe/London"
open-pull-requests-limit: 10
labels:
- "dependencies"
- "nuget"
groups:
umbraco:
patterns:
- "Umbraco.Cms*"
- "Umbraco.Forms*"
update-types:
- "minor"
- "patch"
ignore:
- dependency-name: "Umbraco.Cms*"
update-types: ["version-update:semver-major"]
- dependency-name: "Umbraco.Forms*"
update-types: ["version-update:semver-major"]
ignore:
- dependency-name: "Umbraco.Cms*"
update-types: ["version-update:semver-major"]
- dependency-name: "Umbraco.Forms*"
update-types: ["version-update:semver-major"]
- name: Smoke test dev environment
run: |
response=$(curl -s -o response.html -w "%{http_code}" https://dev.example.com/)
if [ "$response" != "200" ]; then
echo "Homepage returned $response, expected 200"
exit 1
fi
if ! grep -q "expected-content-marker" response.html; then
echo "Homepage HTML did not contain expected marker"
exit 1
fi
version: 2
updates:
- package-ecosystem: "nuget"
directory: "/"
schedule:
interval: "weekly"
ignore:
- dependency-name: "Umbraco.Cms*"
update-types: ["version-update:semver-major"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment