From 5e864a3e706f11523160d529d09deeb70d1f31ab Mon Sep 17 00:00:00 2001 From: stryan Date: Mon, 20 Jan 2025 21:11:00 -0500 Subject: [PATCH] updates? --- .drone.yml | 19 ------------------- .gitea/workflows/build.yml | 4 ++++ create_packs.sh | 6 +++--- generate.sh | 8 ++++---- 4 files changed, 11 insertions(+), 26 deletions(-) delete mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index c0f1d07..0000000 --- a/.drone.yml +++ /dev/null @@ -1,19 +0,0 @@ -kind: pipeline -name: default -steps: - - name: build-container - image: plugins/docker - environment: - CONFIG_JSON: - from_secret: config_json - settings: - repo: git.saintnet.tech/stryan/saintnet_stickers - registry: git.saintnet.tech - password: - from_secret: build_pass - username: - from_secret: build_username - dockerfile: Containerfile - tags: latest - secrets_from_env: - - pack_config=CONFIG_JSON diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 415055b..03ad379 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -15,6 +15,10 @@ jobs: registry: git.saintnet.tech username: ${{ gitea.actor }} password: ${{ secrets.REGISTRY_TOKEN }} + - name: Generate config + env: + CONFIGJSON: ${{ secrets.CONFIG }} + run: "./generate.sh" - name: Build and push env: IMAGE_NAME: saintnet_stickers diff --git a/create_packs.sh b/create_packs.sh index 7fea103..acfb81f 100755 --- a/create_packs.sh +++ b/create_packs.sh @@ -1,9 +1,9 @@ #!/bin/bash if [ ! -f config.json ]; then - echo "no config found during sitcker generation" + echo "no config found during sticker generation" exit 1 fi -for d in packs/*/ ; do - sticker-pack "$d" --add-to-index web/packs/ +for d in packs/*/; do + sticker-pack "$d" --add-to-index web/packs/ done rm config.json diff --git a/generate.sh b/generate.sh index 5812bdf..4a4a76f 100755 --- a/generate.sh +++ b/generate.sh @@ -8,8 +8,8 @@ if [ ! -s config.json ]; then echo "no config found" exit 1 fi -if [[ -z $(grep '[^[:space:]]' "config.json") ]] ; then - echo "no config in file" - rm config.json - exit 1 +if [[ -z $(grep '[^[:space:]]' "config.json") ]]; then + echo "no config in file" + rm config.json + exit 1 fi