Skip to content

Commit

Permalink
build: switch to renovate
Browse files Browse the repository at this point in the history
  • Loading branch information
npepinpe committed Jan 1, 2025
1 parent 84af0b3 commit 9e10907
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 64 deletions.
16 changes: 0 additions & 16 deletions .github/dependabot.yml

This file was deleted.

48 changes: 0 additions & 48 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,51 +159,3 @@ jobs:
name: Event File
path: ${{ github.event_path }}
retention-days: 1

auto-merge:
# This workflow will auto merge a PR authored by dependabot[bot]. It runs only on open PRs ready for
# review.
#
# It will merge the PR only if: it is authored by dependabot[bot], is a minor or patch semantic
# update, and all CI checks are successful (ignoring the soon-to-be-removed Jenkins check).
#
# The workflow is divided into multiple sequential jobs to allow giving only minimal permissions to
# the GitHub token passed around.
#
# Once we're using the merge queue feature, I think we can simplify this workflow a lot by relying
# on dependabot merging PRs via its commands, as it will always wait for checks to be green before
# merging.
name: Auto-merge dependabot, camundait, and backport PRs
runs-on: ubuntu-latest
needs: [ test-summary ]
if: github.repository == 'camunda/zeebe-process-test' && (github.actor == 'dependabot[bot]' || github.actor == 'camundait' || github.actor == 'backport-action')
permissions:
checks: read
pull-requests: write
steps:
- uses: actions/checkout@v4
- id: metadata
if: github.actor == 'dependabot[bot]'
name: Fetch dependency metadata
uses: dependabot/[email protected]
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- id: approve-and-merge-dependabot
name: Approve and merge dependabot PR
if: github.actor == 'dependabot[bot]' && (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"
gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- id: approve-and-merge-backport
name: Approve and merge backport PR
if: github.actor != 'dependabot[bot]'
run: >
gh pr review --approve "$PR_URL"
gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}

62 changes: 62 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"enabled": true,
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended"
],
"commitMessagePrefix": "deps:",
"baseBranches": [
"/^stable\\/8\\..*/",
"main"
],
"dependencyDashboard": true,
"prConcurrentLimit": 30,
"prHourlyLimit": 2,
"updateNotScheduled": false,
"schedule": [
"at any time"
],
"vulnerabilityAlerts": {
"labels": ["area/security"],
"enabled": true
},
"lockFileMaintenance": {
"enabled": true,
"automerge": true,
"addLabels": ["automerge"]
},
"packageRules": [
{
"description": "Only patch updates for our maintenance branches to avoid breaking changes.",
"matchBaseBranches": [
"/^stable\\/8\\..*/"
],
"matchUpdateTypes": ["minor", "major"],
"enabled": false
},
{
"description": "Digest updates cover all use cases since they are used as base, so we disable other types.",
"matchManagers": ["dockerfile"],
"matchFileNames": ["Dockerfile"],
"matchUpdateTypes": ["major", "minor", "patch"],
"enabled": true
},
{
"matchManagers": ["maven"],
"matchPackagePrefixes": ["org.jacoco"],
"allowedVersions": "!/0.8.9/"
},
{
"description": "Exclude SNAPSHOT versions, renovate may suggest them for pre-release values.",
"matchManagers": ["maven"],
"matchPackagePatterns": [".*"],
"allowedVersions": "!/-SNAPSHOT$/"
},
{
"description": "Automerge all updates with green CI.",
"matchPackagePatterns": ["*"],
"automerge": true,
"addLabels": ["automerge"]
}
]
}

0 comments on commit 9e10907

Please sign in to comment.