From 475f0121120541a26bb25df7490afa78a857ff55 Mon Sep 17 00:00:00 2001 From: Nhu Viet Nguyen Date: Wed, 15 Nov 2023 18:26:08 +0100 Subject: [PATCH] make packageName custom checker first + elif --- .github/workflows/reusable_dockerfile_pipeline.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/reusable_dockerfile_pipeline.yml b/.github/workflows/reusable_dockerfile_pipeline.yml index f600270..d3723df 100644 --- a/.github/workflows/reusable_dockerfile_pipeline.yml +++ b/.github/workflows/reusable_dockerfile_pipeline.yml @@ -58,12 +58,10 @@ jobs: # If there is a user submitted package name, use it if [[ ! "${{ inputs.packageName }}" != "" ]]; then PACKAGE_NAME=$(echo "${{ inputs.packageName }}" | tr '[:upper:]' '[:lower:]') - fi - - # 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 - if [[ ! "${{ 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 echo "------------------------------------------------------------" echo "ERROR: Package name not valid! => [ $PACKAGE_NAME} ]" echo "Don't use the repository owner and repository name in the package name."