diff --git a/.github/renovate-openim.json5 b/.github/renovate-openim.json5 new file mode 100644 index 0000000..1181ea0 --- /dev/null +++ b/.github/renovate-openim.json5 @@ -0,0 +1,57 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": ["config:recommended"], + "enabledManagers": ["custom.regex"], + "dependencyDashboard": false, + "branchPrefix": "renovate-bot/", + "commitMessagePrefix": "chore(deps):", + "prConcurrentLimit": 1, + "gitIgnoredAuthors": ["41898282+github-actions[bot]@users.noreply.github.com"], + + "customManagers": [ + { + "customType": "regex", + "description": "Update OpenIM Docker image tags in .env", + "fileMatch": ["^\\.env$"], + "datasourceTemplate": "docker", + "matchStrings": [ + "(?:^|\\n)OPENIM_WEB_FRONT_IMAGE=(?openim/openim-web-front):(?[^\\s#]+)", + "(?:^|\\n)OPENIM_ADMIN_FRONT_IMAGE=(?openim/openim-admin-front):(?[^\\s#]+)", + "(?:^|\\n)OPENIM_SERVER_IMAGE=(?openim/openim-server):(?[^\\s#]+)", + "(?:^|\\n)OPENIM_CHAT_IMAGE=(?openim/openim-chat):(?[^\\s#]+)" + ] + } + ], + + "packageRules": [ + { + "matchDatasources": ["docker"], + "matchPackageNames": [ + "openim/openim-web-front", + "openim/openim-admin-front", + "openim/openim-server", + "openim/openim-chat" + ], + "groupName": "OpenIM Docker images", + "groupSlug": "openim-images" + }, + { + "matchDatasources": ["docker"], + "matchPackageNames": [ + "openim/openim-web-front", + "openim/openim-admin-front" + ], + "allowedVersions": "/^release-v\\d+\\.\\d+\\.\\d+(?:-patch\\.\\d+)?$/", + "versioning": "regex:^release-v(?\\d+)\\.(?\\d+)\\.(?\\d+)(?:-patch\\.(?\\d+))?$" + }, + { + "matchDatasources": ["docker"], + "matchPackageNames": [ + "openim/openim-server", + "openim/openim-chat" + ], + "allowedVersions": "/^v\\d+\\.\\d+\\.\\d+(?:-patch\\.\\d+)?$/", + "versioning": "regex:^v(?\\d+)\\.(?\\d+)\\.(?\\d+)(?:-patch\\.(?\\d+))?$" + } + ] +} diff --git a/.github/workflows/update-docker-image-tags.yml b/.github/workflows/update-docker-image-tags.yml new file mode 100644 index 0000000..e753773 --- /dev/null +++ b/.github/workflows/update-docker-image-tags.yml @@ -0,0 +1,32 @@ +name: Update OpenIM Image Tags + +on: + workflow_dispatch: + schedule: + - cron: "0 3 * * 1" + +concurrency: + group: update-openim-image-tags + cancel-in-progress: true + +jobs: + renovate: + name: Check OpenIM image tags + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + + steps: + - name: Checkout repository + uses: actions/checkout@v7 + + - name: Run Renovate + uses: renovatebot/github-action@v46.1.17 + with: + configurationFile: .github/renovate-openim.json5 + token: ${{ github.token }} + env: + RENOVATE_ONBOARDING: "false" + RENOVATE_REQUIRE_CONFIG: ignored + RENOVATE_REPOSITORIES: ${{ github.repository }}