From 433ea42b15c77f40b31a5d119ca61340a74860da Mon Sep 17 00:00:00 2001 From: Finn Date: Tue, 23 Apr 2024 17:53:17 -0700 Subject: [PATCH] multi-arch builds --- .forgejo/workflows/docker-build.yaml | 1 + config/config.go | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.forgejo/workflows/docker-build.yaml b/.forgejo/workflows/docker-build.yaml index 5a784b5..4abc557 100644 --- a/.forgejo/workflows/docker-build.yaml +++ b/.forgejo/workflows/docker-build.yaml @@ -16,4 +16,5 @@ jobs: with: file: Containerfile tags: git.janky.solutions/finn/lockserver:latest + platforms: linux/amd64,linux/arm64 push: true diff --git a/config/config.go b/config/config.go index 4d10f51..e33118e 100644 --- a/config/config.go +++ b/config/config.go @@ -24,8 +24,10 @@ var C = Config{ SessionSecrets: []JSONBytes{}, } +var configFiles = []string{"lockserver.json", "/etc/lockserver.json"} + func Load() error { - for _, path := range []string{"lockserver.json", "/etc/lockserver.json"} { + for _, path := range configFiles { err := load(path) if err != nil { if errors.Is(err, os.ErrNotExist) {