From 57991201c1967ee4e421d8eaa854c327dc6fc984 Mon Sep 17 00:00:00 2001 From: Nhu Viet Nguyen Date: Wed, 15 Nov 2023 18:37:07 +0100 Subject: [PATCH] make packageName custom checker first + elif + else pt5 --- .github/workflows/reusable_dockerfile_pipeline.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reusable_dockerfile_pipeline.yml b/.github/workflows/reusable_dockerfile_pipeline.yml index 2440b88..a6db44b 100644 --- a/.github/workflows/reusable_dockerfile_pipeline.yml +++ b/.github/workflows/reusable_dockerfile_pipeline.yml @@ -54,10 +54,10 @@ jobs: echo "${{ inputs.packageName }}" # If there is a user submitted package name, use it - if [[ ! "${{ inputs.packageName }}" != "" ]]; then + if [[ -n "${{ inputs.packageName }}" ]]; then PACKAGE_NAME=$(echo "${{ inputs.packageName }}" | tr '[:upper:]' '[:lower:]') echo "INSIDOOOOOR: $PACKAGE_NAME" - elif [[ ! "${{ inputs.packageName }}" == "${{ github.repository }}" ]]; then + elif [[ "${{ inputs.packageName }}" == "${{ github.repository }}" ]]; then # If a user submitted package name that has the naming containing # both the repository owner and repository name, we fail # e.g: inputs.packageName = "celestiaorg/celestiaorg" is not allowed