From 4ad2997717e02a3ab84511515ccfb0aa0695366d Mon Sep 17 00:00:00 2001 From: lanvent Date: Fri, 31 Mar 2023 15:13:28 +0800 Subject: [PATCH] compatibility: lower boolean values in env --- .github/workflows/deploy-image.yml | 3 +-- config.py | 7 ++++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy-image.yml b/.github/workflows/deploy-image.yml index e5fe501..9dc0a63 100644 --- a/.github/workflows/deploy-image.yml +++ b/.github/workflows/deploy-image.yml @@ -12,8 +12,7 @@ name: Create and publish a Docker image on: push: branches: ['master'] - release: - types: [published] + create: env: REGISTRY: ghcr.io IMAGE_NAME: ${{ github.repository }} diff --git a/config.py b/config.py index fec10b8..008f447 100644 --- a/config.py +++ b/config.py @@ -124,7 +124,12 @@ def load_config(): try: config[name] = eval(value) except: - config[name] = value + if value == "false": + config[name] = False + elif value == "true": + config[name] = True + else: + config[name] = value logger.info("[INIT] load config: {}".format(config))