From b7efc38c386b4c40cc7135039c2127ec373e0cd1 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Tue, 13 Feb 2024 21:32:36 -0500 Subject: [PATCH] chore: migrate to renovatebot, add support for GitHub actions (#29045) GitHub Actions is [transitioning from Node 16 to Node 20](https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/). As a result, we have several GitHub Actions that need to be updated. Rather than update these actions manually, I decided to have Renovatebot do it. This PR adds Renovatebot so it can automatically create PRs to update our GitHub Actions dependencies. I also migrated the Dependabot config to use Renovatebot so we don't have two dependency management tools. Example test run: https://github.com/liamdebeasi/framework-renovate-test/pulls Note: You can ignore the Docker update. I am using this fork for Docker-related work as well. As a result of this PR, Renovatebot will create several PRs on this repo to update GitHub Actions dependencies. --- .github/dependabot.yml | 20 --------- renovate.json5 | 94 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 94 insertions(+), 20 deletions(-) delete mode 100644 .github/dependabot.yml create mode 100644 renovate.json5 diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 8484a6f0af..0000000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,20 +0,0 @@ -version: 2 -updates: - - package-ecosystem: "npm" - directory: "/core" - schedule: - interval: "daily" - versioning-strategy: increase - allow: - - dependency-name: "@playwright/test" - - dependency-name: "@axe-core/playwright" - - dependency-name: "@stencil/angular-output-target" - - dependency-name: "@stencil/core" - - dependency-name: "@stencil/react-output-target" - - dependency-name: "@stencil/sass" - - dependency-name: "@stencil/vue-output-target" - - dependency-name: "ionicons" - - dependency-name: "@capacitor/core" - - dependency-name: "@capacitor/keyboard" - - dependency-name: "@capacitor/haptics" - - dependency-name: "@capacitor/status-bar" diff --git a/renovate.json5 b/renovate.json5 new file mode 100644 index 0000000000..bfb2bcf930 --- /dev/null +++ b/renovate.json5 @@ -0,0 +1,94 @@ +{ + $schema: "https://docs.renovatebot.com/renovate-schema.json", + extends: ["config:base", ":semanticCommitTypeAll(chore)"], + packageRules: [ + { + // Group these two as they may rely on one another during major version bumps + matchPackageNames: ["actions/download-artifact", "actions/upload-artifact"], + groupName: "Download + Upload Artifacts" + }, + { + matchPackagePatterns: ["@stencil/core", "@stencil/angular-output-target", "@stencil/react-output-target", "@stencil/sass", "@stencil/vue-output-target"], + groupName: "stencil", + matchFileNames: [ + "core/package.json" + ] + }, + { + matchPackagePatterns: ["@capacitor/core", "@capacitor/keyboard", "@capacitor/haptics", "@capacitor/status-bar"], + groupName: "capacitor", + matchFileNames: [ + "core/package.json" + ] + }, + { + matchDatasources: ["npm"], + matchPackagePatterns: ["@playwright/test", "@axe-core/playwright"], + groupName: "playwright", + matchFileNames: [ + "core/package.json" + ] + }, + { + matchPackagePatterns: ["ionicons"], + groupName: "ionicons", + matchFileNames: [ + "core/package.json" + ] + }, + /** + * While we update dependencies in certain directories, we currently + * do not want to update every single dependency. Some of the dependencies are + * very out of date, and the team needs to schedule work to account for + * breaking changes in some of these updates. To potentially avoid a large number of + * failing PRs the team has chosen to selectively enable dependencies to be updated + * as we have capacity to account for breaking changes. + */ + { + matchPackagePatterns: ["tslib", "@ionic/", "@rollup/", "@types/", "@typescript-eslint/", "clean-css-cli", "domino", "eslint", "eslint-config-prettier", "execa", "fs-extra", "jest", "jest-cli", "prettier", "puppeteer", "rollup", "sass", "serve", "stylelint", "stylelint-order"], + groupName: "core-disabled", + matchFileNames: [ + "core/package.json" + ], + enabled: false + }, + /** + * Local Ionic dependencies are managed by the + * workspace to ensure the correct local version is used. + */ + { + matchPackagePatterns: ["@ionic/", "ionicons"], + groupName: "ignore-local-ionic-deps", + matchFileNames: [ + "**/package.json" + ], + enabled: false + }, + { + matchPackagePatterns: ["lerna", "semver"], + groupName: "root-disabled", + matchFileNames: [ + "package.json" + ], + enabled: false + } + ], + dependencyDashboard: false, + minimumReleaseAge: "3 days", + rebaseWhen: "never", + schedule: ["every weekday before 11am"], + semanticCommits: "enabled", + ignorePaths: [ + // Ionic Packages + "packages/angular", + "packages/angular-server", + "packages/react", + "packages/react-router", + "packages/vue", + "packages/vue-router", + "docs", + // Local Development Scripts + "core/custom-rules", + "core/scripts" + ] +}