diff --git a/.woodpecker.yaml b/.woodpecker.yaml index b4a1a0c..60178e7 100644 --- a/.woodpecker.yaml +++ b/.woodpecker.yaml @@ -10,7 +10,7 @@ steps: from_secret: build_username dockerfile: Containerfile tags: latest - config_json: + configjson: from_secret: config_json when: - branch: 'master' diff --git a/create_packs.sh b/create_packs.sh index 28ec5cd..a67483e 100755 --- a/create_packs.sh +++ b/create_packs.sh @@ -1,6 +1,15 @@ #!/bin/bash -echo "$CONFIG_JSON" >> config.json +echo "$PLUGIN_CONFIGJSON" >> config.json + +if [ ! -s config.json ]; then + echo "no config found" + exit 1 +fi +if [[ -z $(grep '[^[:space:]]' "config.json") ]] ; then + echo "no config in file" + exit 1 +fi + for d in packs/*/ ; do sticker-pack "$d" --add-to-index web/packs/ done -rm config.json