From f5d3e4d58222a0dacaff656f9b8bf4d4ae53c8f4 Mon Sep 17 00:00:00 2001 From: Leon Mika Date: Sun, 23 Nov 2025 22:17:46 +1100 Subject: [PATCH] Actually made use of the writing of image data --- .forgejo/workflows/publish.yaml | 4 +++- cmd/fetch-header-image/main.go | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.forgejo/workflows/publish.yaml b/.forgejo/workflows/publish.yaml index 654f70e..3801b0c 100644 --- a/.forgejo/workflows/publish.yaml +++ b/.forgejo/workflows/publish.yaml @@ -26,7 +26,9 @@ jobs: cp -r site/* build/. - name: Building Header Image run: | - go run ./cmd/fetch-header-image -o build/imgs/header.jpg + go run ./cmd/fetch-header-image -o build/imgs/header.jpg \ + -curr-image-data https://assets.lmika.org/data/current-pending-images.json + -out-data build/data/current-pending-images.json - name: Deploying Site run: | netlify deploy --dir build --prod \ No newline at end of file diff --git a/cmd/fetch-header-image/main.go b/cmd/fetch-header-image/main.go index 6ac676d..b4df8fb 100644 --- a/cmd/fetch-header-image/main.go +++ b/cmd/fetch-header-image/main.go @@ -15,9 +15,9 @@ import ( func main() { headerImages := flag.String("i", "data/pending-header-images.json", "header images json file") - currentPendingImage := flag.String("ip", "", "current pending image") + currentPendingImage := flag.String("curr-image-data", "", "current header image URL") targetFile := flag.String("o", "out.jpg", "target file") - odFile := flag.String("od", "out-data.json", "target file data") + odFile := flag.String("out-data", "out-data.json", "target file data") flag.Parse() pis, err := LoadPendingImages(*headerImages)