mirror of
https://github.com/hassio-addons/addon-vscode.git
synced 2025-05-03 02:31:34 +00:00
Add Renovate for dependency management (#593)
This commit is contained in:
parent
0e49d1ea50
commit
17de42d37d
3 changed files with 138 additions and 15 deletions
13
.github/dependabot.yaml
vendored
13
.github/dependabot.yaml
vendored
|
@ -1,13 +0,0 @@
|
|||
---
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: daily
|
||||
time: "06:00"
|
||||
- package-ecosystem: "pip"
|
||||
directory: "/vscode"
|
||||
schedule:
|
||||
interval: daily
|
||||
time: "06:00"
|
134
.github/renovate.json
vendored
Normal file
134
.github/renovate.json
vendored
Normal file
|
@ -0,0 +1,134 @@
|
|||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"rebaseWhen": "behind-base-branch",
|
||||
"dependencyDashboard": true,
|
||||
"labels": ["dependencies", "no-stale"],
|
||||
"commitMessagePrefix": "⬆️",
|
||||
"commitMessageTopic": "{{depName}}",
|
||||
"regexManagers": [
|
||||
{
|
||||
"fileMatch": ["/Dockerfile$", "/build.yaml$"],
|
||||
"matchStringsStrategy": "any",
|
||||
"matchStrings": [
|
||||
"ARG BUILD_FROM=(?<depName>.*?):(?<currentValue>.*?)\\s+",
|
||||
"(aarch64|amd64|armhf|armv7|i386):\\s[\"']?(?<depName>.*?):(?<currentValue>.*?)[\"']?\\s"
|
||||
],
|
||||
"datasourceTemplate": "docker"
|
||||
},
|
||||
{
|
||||
"fileMatch": ["/Dockerfile$"],
|
||||
"matchStringsStrategy": "any",
|
||||
"matchStrings": [
|
||||
"\\s\\s(?<package>[a-z0-9][a-z0-9-]+)=(?<currentValue>[a-z0-9-:_+~.]+)\\s+"
|
||||
],
|
||||
"versioningTemplate": "deb",
|
||||
"datasourceTemplate": "repology",
|
||||
"depNameTemplate": "debian_11/{{package}}"
|
||||
},
|
||||
{
|
||||
"fileMatch": ["/Dockerfile$"],
|
||||
"matchStrings": [
|
||||
"ARG CODE_SERVER_VERSION=[\"']?(?<currentValue>.+?)[\"']?\\s+"
|
||||
],
|
||||
"datasourceTemplate": "github-releases",
|
||||
"depNameTemplate": "cdr/code-server"
|
||||
},
|
||||
{
|
||||
"fileMatch": ["/Dockerfile$"],
|
||||
"matchStrings": [
|
||||
"ARG HA_CLI_VERSION=[\"']?(?<currentValue>.+?)[\"']?\\s+"
|
||||
],
|
||||
"datasourceTemplate": "github-releases",
|
||||
"depNameTemplate": "home-assistant/cli",
|
||||
"versioningTemplate": "loose"
|
||||
},
|
||||
{
|
||||
"fileMatch": ["vscode/vscode.extensions$"],
|
||||
"matchStrings": ["emilast\\.LogFileHighlighter#(?<currentValue>.+)\\s"],
|
||||
"datasourceTemplate": "github-releases",
|
||||
"depNameTemplate": "emilast/vscode-logfile-highlighter"
|
||||
},
|
||||
{
|
||||
"fileMatch": ["vscode/vscode.extensions$"],
|
||||
"matchStrings": ["esbenp\\.prettier-vscode#(?<currentValue>.+)\\s"],
|
||||
"datasourceTemplate": "github-releases",
|
||||
"depNameTemplate": "prettier/prettier-vscode"
|
||||
},
|
||||
{
|
||||
"fileMatch": ["vscode/vscode.extensions$"],
|
||||
"matchStrings": ["ESPHome\\.esphome-vscode#(?<currentValue>.+)\\s"],
|
||||
"datasourceTemplate": "github-releases",
|
||||
"depNameTemplate": "esphome/esphome-vscode",
|
||||
"versioningTemplate": "loose"
|
||||
},
|
||||
{
|
||||
"fileMatch": ["vscode/vscode.extensions$"],
|
||||
"matchStrings": [
|
||||
"keesschollaart\\.vscode-home-assistant#(?<currentValue>.+)\\s"
|
||||
],
|
||||
"datasourceTemplate": "github-releases",
|
||||
"depNameTemplate": "keesschollaart81/vscode-home-assistant"
|
||||
},
|
||||
{
|
||||
"fileMatch": ["vscode/vscode.extensions$"],
|
||||
"matchStrings": [
|
||||
"lukas-tr\\.materialdesignicons-intellisense#(?<currentValue>.+)\\s"
|
||||
],
|
||||
"datasourceTemplate": "github-releases",
|
||||
"depNameTemplate": "lukas-tr/vscode-materialdesignicons-intellisense"
|
||||
},
|
||||
{
|
||||
"fileMatch": ["vscode/vscode.extensions$"],
|
||||
"matchStrings": ["netcorext\\.uuid-generator#(?<currentValue>.+)\\s"],
|
||||
"datasourceTemplate": "github-releases",
|
||||
"depNameTemplate": "arenchen/vscode-uuid-generator"
|
||||
},
|
||||
{
|
||||
"fileMatch": ["vscode/vscode.extensions$"],
|
||||
"matchStrings": ["usernamehw\\.errorlens#(?<currentValue>.+)\\s"],
|
||||
"datasourceTemplate": "github-releases",
|
||||
"depNameTemplate": "usernamehw/vscode-error-lens"
|
||||
}
|
||||
],
|
||||
"packageRules": [
|
||||
{
|
||||
"matchDatasources": ["repology"],
|
||||
"automerge": true
|
||||
},
|
||||
{
|
||||
"groupName": "Add-on base image",
|
||||
"matchDatasources": ["docker"]
|
||||
},
|
||||
{
|
||||
"groupName": "Add-on base image",
|
||||
"matchDatasources": ["docker"],
|
||||
"matchUpdateTypes": ["patch"],
|
||||
"automerge": true
|
||||
},
|
||||
{
|
||||
"matchDatasources": ["github-releases"],
|
||||
"matchDepNames": ["cdr/code-server"],
|
||||
"matchUpdateTypes": ["minor", "patch"],
|
||||
"automerge": true
|
||||
},
|
||||
{
|
||||
"matchDatasources": ["github-releases"],
|
||||
"matchDepNames": ["home-assistant/cli"],
|
||||
"automerge": true
|
||||
},
|
||||
{
|
||||
"matchManagers": ["pip_requirements"],
|
||||
"addLabels": ["python"]
|
||||
},
|
||||
{
|
||||
"matchManagers": ["pip_requirements"],
|
||||
"matchDepTypes": ["dev"],
|
||||
"rangeStrategy": "pin"
|
||||
},
|
||||
{
|
||||
"matchManagers": ["pip_requirements"],
|
||||
"matchUpdateTypes": ["minor", "patch"],
|
||||
"automerge": true
|
||||
}
|
||||
]
|
||||
}
|
|
@ -19,6 +19,8 @@ COPY vscode.extensions /root/vscode.extensions
|
|||
|
||||
# Setup base system
|
||||
ARG BUILD_ARCH=amd64
|
||||
ARG CODE_SERVER_VERSION="v4.11.0"
|
||||
ARG HA_CLI_VERSION="4.23.0"
|
||||
# hadolint ignore=SC2181, DL3008
|
||||
RUN \
|
||||
apt-get update \
|
||||
|
@ -54,7 +56,7 @@ RUN \
|
|||
&& if [[ "${BUILD_ARCH}" = "aarch64" ]]; then ARCH="arm64"; fi \
|
||||
&& if [[ "${BUILD_ARCH}" = "amd64" ]]; then ARCH="amd64"; fi \
|
||||
&& curl -J -L -o /tmp/code.tar.gz \
|
||||
"https://github.com/cdr/code-server/releases/download/v4.11.0/code-server-4.11.0-linux-${ARCH}.tar.gz" \
|
||||
"https://github.com/cdr/code-server/releases/download/${CODE_SERVER_VERSION}/code-server-${CODE_SERVER_VERSION#v}-linux-${ARCH}.tar.gz" \
|
||||
&& mkdir -p /usr/local/lib/code-server \
|
||||
&& tar zxvf \
|
||||
/tmp/code.tar.gz \
|
||||
|
@ -86,7 +88,7 @@ RUN \
|
|||
&& ls -la /usr/local/lib/code-server/lib/vscode/extensions/ \
|
||||
\
|
||||
&& curl -L -s -o /usr/bin/ha \
|
||||
"https://github.com/home-assistant/cli/releases/download/4.23.0/ha_${BUILD_ARCH}" \
|
||||
"https://github.com/home-assistant/cli/releases/download/${HA_CLI_VERSION}/ha_${BUILD_ARCH}" \
|
||||
&& chmod a+x /usr/bin/ha \
|
||||
\
|
||||
&& git clone --branch master --single-branch --depth 1 \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue