Skip to content

Commit

Permalink
Simplify Renovate and other small improvements (#97)
Browse files Browse the repository at this point in the history
* Simplify to only look at build.json

* Set version

* Use BUILD_FROM and remove unused git and purge curl

* Add dev features

* Remove unneed lint test

* Keep curl

It's in the upstream container already so no need to try installing it
  • Loading branch information
lildude authored Oct 31, 2024
1 parent 27034ee commit 01fa619
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 19 deletions.
5 changes: 5 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
"containerEnv": {
"WORKSPACE_DIRECTORY": "${containerWorkspaceFolder}"
},
"features": {
// "ghcr.io/devcontainers/features/node:1": {}, /* Only used for renovate testing */
"ghcr.io/eitsupi/devcontainer-features/jq-likes:2": {},
"ghcr.io/jungaretti/features/ripgrep:1": {}
},
"customizations": {
"vscode": {
"extensions": [
Expand Down
6 changes: 3 additions & 3 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
"prBodyTemplate": "{{{table}}}{{{warnings}}}{{{notes}}}{{{changelogs}}}",
"semanticCommits": "disabled",
"commitMessageTopic": "{{#if (containsString depName 'ghostfolio')}}Ghostfolio{{else}}{{depName}}{{/if}}",
"enabledManagers": ["custom.regex", "github-actions", "dockerfile"],
"enabledManagers": ["custom.regex", "github-actions"],
"customManagers": [
{
"customType": "regex",
"fileMatch": "^build.json$",
"matchStrings": [
"\"ghostfolio_version\": \"(?<currentValue>\\d+\\.\\d+\\.\\d+)\"",
"(aarch64|amd64|armhf|armv7|i386):\\s[\"']?(?<depName>.*?):(?<currentValue>.*?)[\"']?\\s"
"\"ghostfolio/ghostfolio:(?<currentValue>\\d+\\.\\d+\\.\\d+)\"",
"\"ghostfolio_version\": \"(?<currentValue>\\d+\\.\\d+\\.\\d+)\""
],
"datasourceTemplate": "github-releases",
"depNameTemplate": "ghostfolio/ghostfolio"
Expand Down
10 changes: 0 additions & 10 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,3 @@ jobs:
uses: frenck/action-addon-linter@v2
with:
path: "./"

- name: Check versions match
run: |
docker_ver=$(grep "FROM ghostfolio/ghostfolio" Dockerfile | cut -d':' -f2)
build_ver=$(jq -r ".args.ghostfolio_version" build.json)
if [ "$docker_ver" != "$build_ver" ]; then
echo -e "\033[31;1mGhostfolio versions don't match: Dockerfile => ${docker_ver} | build.json => ${build_ver}\033[0m"
exit 1
fi
echo -e "\033[32;1mGhostfolio versions match: Dockerfile => ${docker_ver} | build.json => ${build_ver}\033[0m"
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM ghostfolio/ghostfolio:2.120.0
ARG BUILD_FROM
FROM $BUILD_FROM

ARG BUILD_ARCH
ARG BASHIO_VERSION=0.16.2
Expand All @@ -14,8 +15,6 @@ ENV \

USER root
RUN apt-get update && apt-get install -y \
curl \
git \
jq \
redis \
xz-utils \
Expand Down
6 changes: 3 additions & 3 deletions build.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"build_from": {
"aarch64": "ghostfolio/ghostfolio:not-used",
"amd64": "ghostfolio/ghostfolio:not-used",
"armv7": "ghostfolio/ghostfolio:not-used"
"aarch64": "ghostfolio/ghostfolio:2.120.0",
"amd64": "ghostfolio/ghostfolio:2.120.0",
"armv7": "ghostfolio/ghostfolio:2.120.0"
},
"args": {
"ghostfolio_version": "2.120.0"
Expand Down

0 comments on commit 01fa619

Please sign in to comment.