From 5b3f93457bbb715f50f3d71016022509da36efb9 Mon Sep 17 00:00:00 2001 From: naskya Date: Tue, 7 May 2024 06:53:03 +0900 Subject: [PATCH] dev: add renovate --- .gitlab-ci.yml | 15 ++++++++++++++- renovate.json | 15 +++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 renovate.json diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6e2c742cbf..9ea1dd4d18 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -25,6 +25,7 @@ cache: stages: - test - build + - dependency variables: POSTGRES_DB: 'firefish_db' @@ -65,7 +66,7 @@ container_image_build: - if: $CI_COMMIT_BRANCH == 'develop' script: - apt-get update && apt-get -y upgrade - - apt-get install -y --no-install-recommends buildah + - apt-get install -y --no-install-recommends buildah ca-certificates - buildah login --username "${CI_REGISTRY_USER}" --password "${CI_REGISTRY_PASSWORD}" "${CI_REGISTRY}" - buildah build --tag "${CI_REGISTRY}/${CI_PROJECT_PATH}/develop:not-for-production" --platform linux/amd64 . - buildah push "${CI_REGISTRY}/${CI_PROJECT_PATH}/develop:not-for-production" @@ -105,3 +106,15 @@ cargo_clippy: when: never script: - cargo clippy -- -D warnings + +renovate: + stage: dependency + image: + name: docker.io/renovate/renovate:37-slim + entrypoint: [""] + rules: + - if: $RENOVATE && $CI_PIPELINE_SOURCE == 'schedule' + services: [] + before_script: [] + script: + - renovate --platform gitlab --token "${API_TOKEN}" --endpoint "${CI_SERVER_URL}/api/v4" "${CI_PROJECT_PATH}" diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000000..d6f15c4854 --- /dev/null +++ b/renovate.json @@ -0,0 +1,15 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": ["config:base"], + "rangeStrategy": "bump", + "branchConcurrentLimit": 5, + "enabledManagers": ["npm", "cargo"], + "baseBranches": ["develop"], + "lockFileMaintenance": { + "enabled": true, + "recreateWhen": "always", + "rebaseStalePrs": true, + "branchTopic": "lock-file-maintenance", + "commitMessageAction": "Lock file maintenance" + } +}