7 Commits
v3.0.0 ... main

Author SHA1 Message Date
69f2142631 Update WF to run on Gitea runners and add priority for docker tag
All checks were successful
Build and Push Docker Images / build (push) Successful in 8m41s
2026-02-10 21:43:44 +05:30
4cbad67510 Squashed commit of the following:
commit 89694467bb
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Tue Feb 3 19:49:18 2026 +0000

    Update actions/checkout action to v6.0.2
2026-02-06 22:35:04 +05:30
da9d8d5fff Squashed commit of the following:
commit a83416eedc
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Tue Feb 3 19:49:20 2026 +0000

    Update docker/login-action action to v3.7.0
2026-02-06 22:34:50 +05:30
52dd07bcef Squashed commit of the following:
commit 2168cf6b30
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Tue Feb 3 19:49:24 2026 +0000

    Update docker/setup-buildx-action action to v3.12.0
2026-02-06 22:34:19 +05:30
9e802c4fec Update version to v3.1.1 (Fix concurrent writes crash) 2026-02-06 22:21:30 +05:30
9540d855e7 Update version to v3.1.0 (Fix custom gradient colors) 2026-02-01 21:20:46 +05:30
055f039b70 Add renovate.json 2026-01-03 20:28:36 +05:30
5 changed files with 47 additions and 13 deletions

View File

@@ -6,12 +6,12 @@ on:
branches: [ main ]
paths:
- 'build/**'
- '.github/workflows/**'
- '.gitea/workflows/**'
pull_request:
branches: [ main ]
paths:
- 'build/**'
- '.github/workflows/**'
- '.gitea/workflows/**'
jobs:
build:
@@ -20,7 +20,7 @@ jobs:
steps:
-
name: Checkout code
uses: actions/checkout@v6.0.1
uses: actions/checkout@v6.0.2
-
name: Read Version from file
id: version
@@ -41,19 +41,19 @@ jobs:
uses: docker/setup-qemu-action@v3.7.0
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.11.1
uses: docker/setup-buildx-action@v3.12.0
with:
driver-opts: image=moby/buildkit:v0.23.2@sha256:ddd1ca44b21eda906e81ab14a3d467fa6c39cd73b9a39df1196210edcb8db59e
-
name: Login to GitHub Container Registry
uses: docker/login-action@v3.6.0
uses: docker/login-action@v3.7.0
with:
registry: ghcr.io
username: ${{ vars.GH_USERNAME }}
password: ${{ secrets.GH_TOKEN }}
-
name: Login to Docker Hub
uses: docker/login-action@v3.6.0
uses: docker/login-action@v3.7.0
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
@@ -69,14 +69,14 @@ jobs:
type=sha,format=long,prefix=sha-
type=raw,value=${{ steps.version.outputs.major_version }}
type=raw,value=${{ steps.version.outputs.minor_version }}
type=raw,value=${{ steps.version.outputs.version }}
type=raw,value=${{ steps.version.outputs.version }},priority=1000
type=raw,value=latest
-
name: Build and push
uses: docker/build-push-action@v6.18.0
with:
context: ./build
push: ${{ github.event_name != 'pull_request' }}
push: ${{ gitea.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64,linux/arm/v7

View File

@@ -1,3 +1,16 @@
# v3.1.1
## What's Changed
* Fixed crash caused by concurrent writes under high load ([#684](https://github.com/selfhst/icons/issues/684))
* Suppress favicon error log message when viewing icons directly from a browser
# v3.1.0
## What's Changed
* Updated logic to also replace gradient fills with custom colors when applicable
# v3.0.0
## Breaking Changes

View File

@@ -1 +1 @@
3.0.0
3.1.1

View File

@@ -54,7 +54,6 @@ func (c *Cache) Get(key string) (string, bool) {
}
if time.Since(item.Timestamp) > c.ttl {
delete(c.items, key)
return "", false
}
@@ -169,16 +168,27 @@ func fetchRemoteFile(url string) (string, error) {
func applySVGColor(svgContent, colorCode string) string {
color := "#" + colorCode
// Replace fill:#fff
re1 := regexp.MustCompile(`style="[^"]*fill:\s*#fff[^"]*"`)
svgContent = re1.ReplaceAllStringFunc(svgContent, func(match string) string {
re2 := regexp.MustCompile(`fill:\s*#fff`)
return re2.ReplaceAllString(match, "fill:"+color)
})
re3 := regexp.MustCompile(`fill="#fff"`)
svgContent = re3.ReplaceAllString(svgContent, `fill="`+color+`"`)
// Replace stop-color:#fff in gradients
re4 := regexp.MustCompile(`style="[^"]*stop-color:\s*#fff[^"]*"`)
svgContent = re4.ReplaceAllStringFunc(svgContent, func(match string) string {
re5 := regexp.MustCompile(`stop-color:\s*#fff`)
return re5.ReplaceAllString(match, "stop-color:"+color)
})
re6 := regexp.MustCompile(`stop-color="#fff"`)
svgContent = re6.ReplaceAllString(svgContent, `stop-color="`+color+`"`)
return svgContent
}
@@ -419,6 +429,11 @@ func main() {
mux.HandleFunc("GET /custom/{filename}", handleCustomIcon)
// Suppress favicon load error message in logs when viewing via browser
mux.HandleFunc("GET /favicon.ico", func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusNoContent)
})
mux.HandleFunc("GET /{iconname}/{colorcode}", handleIcon)
mux.HandleFunc("GET /{iconname}", handleIcon)

6
renovate.json Normal file
View File

@@ -0,0 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended"
]
}