Skip to content

Commit 3ffe2ce

Browse files
committed
use params in gh action
1 parent 2f6c641 commit 3ffe2ce

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/deploy-hf-env.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,11 @@ jobs:
112112
HF_NAMESPACE: ${{ env.HF_USERNAME }}
113113
run: |
114114
chmod +x scripts/deploy_to_hf.sh
115-
./scripts/deploy_to_hf.sh "${{ matrix.environment }}" "${{ github.event.inputs.base_image_sha || '' }}"
115+
if [ -n "${{ github.event.inputs.base_image_sha }}" ]; then
116+
./scripts/deploy_to_hf.sh --env "${{ matrix.environment }}" --base-sha "${{ github.event.inputs.base_image_sha }}"
117+
else
118+
./scripts/deploy_to_hf.sh --env "${{ matrix.environment }}"
119+
fi
116120
117121
# Job to deploy single environment
118122
deploy-single:
@@ -140,4 +144,8 @@ jobs:
140144
HF_NAMESPACE: ${{ env.HF_USERNAME }}
141145
run: |
142146
chmod +x scripts/deploy_to_hf.sh
143-
./scripts/deploy_to_hf.sh "${{ matrix.environment }}" "${{ github.event.inputs.base_image_sha || '' }}"
147+
if [ -n "${{ github.event.inputs.base_image_sha }}" ]; then
148+
./scripts/deploy_to_hf.sh --env "${{ matrix.environment }}" --base-sha "${{ github.event.inputs.base_image_sha }}"
149+
else
150+
./scripts/deploy_to_hf.sh --env "${{ matrix.environment }}"
151+
fi

0 commit comments

Comments
 (0)