From a792a8540f06fe1f672da113dd8a7dcdf9b1bf17 Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Mon, 6 Jan 2025 16:13:20 +0100 Subject: [PATCH 1/4] Renovate setup files --- .github/workflows/renovate-validation.yml | 40 +++++++++++++++++++++++ .github/workflows/renovate.yml | 33 +++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 .github/workflows/renovate-validation.yml create mode 100644 .github/workflows/renovate.yml diff --git a/.github/workflows/renovate-validation.yml b/.github/workflows/renovate-validation.yml new file mode 100644 index 0000000000..a1df8db79c --- /dev/null +++ b/.github/workflows/renovate-validation.yml @@ -0,0 +1,40 @@ +# Refer to https://internaldocs.unity.com/renovate/ for more documentation + +# This workflow is for validating the Renovate configuration and docker image +# updates for it. +name: Renovate Validation +on: + workflow_dispatch: + inputs: + log-level: + type: choice + description: Select log level for Renovate + options: + - trace + - debug + - info + - warn + - error + default: info + required: false + pull_request: + paths: + # we trigger validation on any changes to the renovate workflow files + - .github/workflows/renovate*.yml + # as well as for any possible location for the renovate config file + - .github/renovate.json? + + +jobs: + renovate-validation: + # The reusable workflow will be updated by renovate if there's a new version + uses: Unity-Technologies/renovate-workflows/.github/workflows/run.yml@v5.0.0 + with: + # This is the image that contains our custom renovate and will be auto + # updated by Renovate itself. + image: europe-docker.pkg.dev/unity-cds-services-prd/ds-docker/renovate:10.1.3@sha256:fdeed7bb524bd67611eb91ee1a5e990c8c73ed62c84a0cd5ef66c87eb5fd0d70 + dry-run: full + log-level: ${{ github.event.inputs.log-level }} + secrets: + renovate-auth-secret: ${{ secrets.RENOVATE_AUTH_SECRET }} + github-com-token: ${{ secrets.GH_COM_TOKEN }} diff --git a/.github/workflows/renovate.yml b/.github/workflows/renovate.yml new file mode 100644 index 0000000000..5f78e75c12 --- /dev/null +++ b/.github/workflows/renovate.yml @@ -0,0 +1,33 @@ +# This workflow runs Renovate against the current repo and will create PRs with outdated dependencies. +name: Renovate + +on: + workflow_dispatch: + inputs: + log-level: + type: choice + description: Select log level for Renovate + options: + - trace + - debug + - info + - warn + - error + default: info + required: false + schedule: + # Daily scheduled run. + - cron: '0 0 * * *' + +jobs: + renovate: + # The reusable workflow will be updated by renovate if there's a new version + uses: Unity-Technologies/renovate-workflows/.github/workflows/run.yml@v5.0.0 + with: + # This is the image that contains our custom renovate and will be auto + # updated by Renovate itself. + image: europe-docker.pkg.dev/unity-cds-services-prd/ds-docker/renovate:10.1.3@sha256:fdeed7bb524bd67611eb91ee1a5e990c8c73ed62c84a0cd5ef66c87eb5fd0d70 + log-level: ${{ github.event.inputs.log-level }} + secrets: + renovate-auth-secret: ${{ secrets.RENOVATE_AUTH_SECRET }} + github-com-token: ${{ secrets.GH_COM_TOKEN }} \ No newline at end of file From 83115b8012972d6834c51131a8b4c069324fcfe7 Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Mon, 6 Jan 2025 19:39:29 +0100 Subject: [PATCH 2/4] Corrected cron and comment --- .github/workflows/renovate-validation.yml | 2 -- .github/workflows/renovate.yml | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/renovate-validation.yml b/.github/workflows/renovate-validation.yml index a1df8db79c..9ef821bcbd 100644 --- a/.github/workflows/renovate-validation.yml +++ b/.github/workflows/renovate-validation.yml @@ -1,5 +1,3 @@ -# Refer to https://internaldocs.unity.com/renovate/ for more documentation - # This workflow is for validating the Renovate configuration and docker image # updates for it. name: Renovate Validation diff --git a/.github/workflows/renovate.yml b/.github/workflows/renovate.yml index 5f78e75c12..f859c46a94 100644 --- a/.github/workflows/renovate.yml +++ b/.github/workflows/renovate.yml @@ -16,8 +16,8 @@ on: default: info required: false schedule: - # Daily scheduled run. - - cron: '0 0 * * *' + # Every 6 hours at the 6th minute. + - cron: '06 */6 * * *' jobs: renovate: From 44e2c9b367d78e1adb7570c9991126648adf33bd Mon Sep 17 00:00:00 2001 From: michalChrobot Date: Thu, 6 Feb 2025 11:01:12 +0100 Subject: [PATCH 3/4] Added renovate configuration targeting both develop branches --- .github/renovate.json5 | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/renovate.json5 diff --git a/.github/renovate.json5 b/.github/renovate.json5 new file mode 100644 index 0000000000..6c108c5e48 --- /dev/null +++ b/.github/renovate.json5 @@ -0,0 +1,38 @@ +{ + "baseBranches": ["develop", "develop-2.0.0"], + + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "local>unity/renovate-config" + ], + "prConcurrentLimit": 100, + // Ignore commits produced by github actions workflows + "gitIgnoredAuthors": ["githubaction@githubaction.com"], + "ignorePaths": [ + "**/node_modules/**", + // Don't renovate files in special folders using ~ as suffix + "**/*~/**" + ], + "packageRules": [ + + // Run unity-upm-project and unity-upm-package only on weekends to reduce PR noise + // Also ensure dependencies won't be downgraded when they don't exist in the public repositories + { + "matchManagers": [ + "unity-upm-project", + "unity-upm-package" + ], + "enabled": "true", + "schedule": [ + "every weekend" + ], + "rollbackPrs": false + }, + + // Enable automerge for Bokken image updates + { + "matchDatasources": ["unity-bokken"], + "automerge": false, + }, + ], +} From d886bccb6bdd4099226cd5037f1f5f521fb303ce Mon Sep 17 00:00:00 2001 From: Noel Stephens Date: Thu, 6 Feb 2025 06:08:27 -0600 Subject: [PATCH 4/4] Update renovate.json5 --- .github/renovate.json5 | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 6c108c5e48..8d39de48b1 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -14,7 +14,6 @@ "**/*~/**" ], "packageRules": [ - // Run unity-upm-project and unity-upm-package only on weekends to reduce PR noise // Also ensure dependencies won't be downgraded when they don't exist in the public repositories {