From e30be1ee4ab7f93b73111f6a0a90e270967d723e Mon Sep 17 00:00:00 2001 From: sinkcup Date: Thu, 9 Sep 2021 15:00:10 +0800 Subject: [PATCH] refactor: set registry default value in shell --- .github/workflows/ci.yml | 6 +----- coding-generic-sync.sh | 6 ++++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c28d1bf..f7acba5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,11 +19,7 @@ jobs: build: # The type of runner that the job will run on runs-on: ubuntu-latest - - # TODO hard code, because GitHub Actions only support secrets but not env - env: - CODING_GENERIC_REGISTRY: https://coding-public-generic.pkg.coding.net/public/downloads/ - + # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it diff --git a/coding-generic-sync.sh b/coding-generic-sync.sh index 5089b74..6982625 100755 --- a/coding-generic-sync.sh +++ b/coding-generic-sync.sh @@ -2,8 +2,10 @@ set -e if [ "$CODING_GENERIC_REGISTRY" = "" ]; then - echo "WARNING: env CODING_GENERIC_REGISTRY not set, only run download" -elif [ "$CODING_ARTIFACTS_USERNAME" = "" ]; then + echo "WARNING: env CODING_GENERIC_REGISTRY not set, use default value" + CODING_GENERIC_REGISTRY="https://coding-public-generic.pkg.coding.net/public/downloads/" +fi +if [ "$CODING_ARTIFACTS_USERNAME" = "" ]; then echo "WARNING: env CODING_ARTIFACTS_USERNAME not set, only run check and download" fi