diff --git a/.github/renovate.json5 b/.github/renovate.json5 new file mode 100644 index 00000000..71a90454 --- /dev/null +++ b/.github/renovate.json5 @@ -0,0 +1,24 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "config:recommended", + ":dependencyDashboard", + ":timezone(UTC)", + "docker:enableMajor", + "docker:pinDigests", + "group:nextjsMonorepo", + "group:reactMonorepo", + "group:typescript-eslintMonorepo", + "group:tailwindcssMonorepo", + "github>seerr-team/seerr//.github/renovate/actions.json5", + "github>seerr-team/seerr//.github/renovate/groups.json5", + "github>seerr-team/seerr//.github/renovate/helm.json5", + "github>seerr-team/seerr//.github/renovate/labels.json5", + "github>seerr-team/seerr//.github/renovate/pnpm.json5", + "github>seerr-team/seerr//.github/renovate/semanticCommits.json5" + ], + "dependencyDashboardTitle": "Renovate Dashboard 🤖", + "suppressNotifications": ["prEditedNotification", "prIgnoreNotification"], + "rebaseWhen": "conflicted", + "labels": ["dependencies"] +} diff --git a/.github/renovate/actions.json5 b/.github/renovate/actions.json5 new file mode 100644 index 00000000..3e99b180 --- /dev/null +++ b/.github/renovate/actions.json5 @@ -0,0 +1,14 @@ +{ + $schema: 'https://docs.renovatebot.com/renovate-schema.json', + + extends: ['helpers:pinGitHubActionDigests'], + + packageRules: [ + // All GitHub Actions need manual review + { + matchManagers: ['github-actions'], + groupName: 'GitHub Actions', + minimumReleaseAge: '7 days', + }, + ], +} diff --git a/.github/renovate/groups.json5 b/.github/renovate/groups.json5 new file mode 100644 index 00000000..73fa3248 --- /dev/null +++ b/.github/renovate/groups.json5 @@ -0,0 +1,21 @@ +{ + $schema: 'https://docs.renovatebot.com/renovate-schema.json', + + packageRules: [ + // Node.js + { + matchPackageNames: ['node'], + matchManagers: ['dockerfile', 'npm'], + groupName: 'Node.js', + minimumReleaseAge: '7 days', + commitMessageTopic: 'Node.js', + }, + + // Database packages + { + matchPackageNames: ['pg', 'sqlite3', 'typeorm'], + groupName: 'Database', + minimumReleaseAge: '7 days', + }, + ], +} diff --git a/.github/renovate/helm.json5 b/.github/renovate/helm.json5 new file mode 100644 index 00000000..1cbe0543 --- /dev/null +++ b/.github/renovate/helm.json5 @@ -0,0 +1,22 @@ +{ + $schema: 'https://docs.renovatebot.com/renovate-schema.json', + + packageRules: [ + { + matchManagers: ['helm-values'], + matchFileNames: ['charts/*/values.yaml'], + }, + ], + + customManagers: [ + { + customType: 'regex', + description: 'Update appVersion in Chart.yaml to match Docker image', + fileMatch: ['(^|/)Chart\\.yaml$'], + matchStrings: [ + '#\\s+renovate:\\s+image=(?\\S*)\nappVersion:\\s+"(?\\S*)"', + ], + datasourceTemplate: 'docker', + }, + ], +} diff --git a/.github/renovate/labels.json5 b/.github/renovate/labels.json5 new file mode 100644 index 00000000..7bb50737 --- /dev/null +++ b/.github/renovate/labels.json5 @@ -0,0 +1,29 @@ +{ + $schema: 'https://docs.renovatebot.com/renovate-schema.json', + + packageRules: [ + // JavaScript/npm packages + { + matchManagers: ['npm'], + addLabels: ['javascript'], + }, + + // GitHub Actions + { + matchManagers: ['github-actions'], + addLabels: ['github_actions'], + }, + + // Docker images + { + matchManagers: ['dockerfile', 'docker-compose'], + addLabels: ['docker'], + }, + + // Helm charts + { + matchManagers: ['helm-values'], + addLabels: ['helm'], + }, + ], +} diff --git a/.github/renovate/pnpm.json5 b/.github/renovate/pnpm.json5 new file mode 100644 index 00000000..2ec1f41e --- /dev/null +++ b/.github/renovate/pnpm.json5 @@ -0,0 +1,11 @@ +{ + $schema: 'https://docs.renovatebot.com/renovate-schema.json', + + // Run pnpm dedupe after dependency updates + postUpdateOptions: ['pnpmDedupe'], + + lockFileMaintenance: { + enabled: true, + }, + +} diff --git a/.github/renovate/semanticCommits.json5 b/.github/renovate/semanticCommits.json5 new file mode 100644 index 00000000..23e77639 --- /dev/null +++ b/.github/renovate/semanticCommits.json5 @@ -0,0 +1,33 @@ +{ + $schema: 'https://docs.renovatebot.com/renovate-schema.json', + + packageRules: [ + // Default for all dependencies + { + matchPackagePatterns: ['*'], + semanticCommitType: 'chore', + semanticCommitScope: 'deps', + }, + + // Node.js runtime + { + matchPackageNames: ['node'], + semanticCommitType: 'build', + semanticCommitScope: 'node', + }, + + // GitHub Actions + { + matchManagers: ['github-actions'], + semanticCommitType: 'ci', + semanticCommitScope: 'actions', + }, + + // Docker + { + matchManagers: ['dockerfile'], + semanticCommitType: 'build', + semanticCommitScope: 'docker', + }, + ], +} diff --git a/renovate.json b/renovate.json deleted file mode 100644 index bc68da3a..00000000 --- a/renovate.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": [ - "config:js-app", - "group:allNonMajor", - "docker:disableMajor", - "helpers:disableTypesNodeMajor" - ], - "packageRules": [ - { - "matchManagers": ["github-actions"], - "groupName": "GitHub Actions", - "groupSlug": "github-actions" - }, - { - "matchPackageNames": ["node"], - "groupName": "Node.js", - "groupSlug": "node" - } - ] -}