Skip to content

Commit 4a44eb9

Browse files
committed
declare hub tag in bash script and yml
1 parent ad5a1e0 commit 4a44eb9

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.github/workflows/pr-new-env.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ jobs:
138138
run: |
139139
set -euo pipefail
140140
chmod +x scripts/deploy_to_hf.sh
141-
./scripts/deploy_to_hf.sh --env "${{ matrix.environment }}" --space-suffix "${SPACE_SUFFIX}"
141+
./scripts/deploy_to_hf.sh --env "${{ matrix.environment }}" --space-suffix "${SPACE_SUFFIX}" --hub-tag "openenv-pr"
142142
143143
- name: Wait for deployment to stabilize
144144
shell: bash

scripts/deploy_to_hf.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ while [[ $# -gt 0 ]]; do
7575
ENV_NAME="$2"
7676
shift 2
7777
;;
78+
--hub-tag)
79+
HUB_TAG="$2"
80+
shift 2
81+
;;
7882
--base-sha|--base-image-sha)
7983
BASE_IMAGE_SHA="$2"
8084
shift 2
@@ -127,6 +131,10 @@ while [[ $# -gt 0 ]]; do
127131
esac
128132
done
129133

134+
if [ -z "$HUB_TAG" ]; then
135+
HUB_TAG="openenv"
136+
fi
137+
130138
if [ -z "$ENV_NAME" ]; then
131139
echo "Error: Environment name is required" >&2
132140
usage
@@ -364,6 +372,8 @@ sdk: docker
364372
pinned: false
365373
app_port: 8000
366374
base_path: /web
375+
tags:
376+
- ${HUB_TAG}
367377
---
368378
369379
# ${env_title} Environment Server

0 commit comments

Comments
 (0)