You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
local inventory_file="${SPIN_INVENTORY_FILE:-"/etc/ansible/collections/ansible_collections/serversideup/spin/plugins/inventory/spin-dynamic-inventory.sh"}"
49
+
local infrastructure_folder=".infrastructure"
50
+
51
+
if [ !-d"$infrastructure_folder" ];then
52
+
echo"${BOLD}${RED}❌ Infrastructure folder not found${RESET}"
53
+
echo"Please ensure you're in the root of your project."
54
+
return 1
55
+
fi
56
+
57
+
if [ !-d"$infrastructure_folder/deploy-keys" ] || [ !-f"$infrastructure_folder/deploy-keys/.gitignore" ];then
echo"${BOLD}${RED}❌ Environment file not found ($env_file)${RESET}">&2
203
+
echo"Please ensure you have an environment variable file for the \"$gha_environment\" environment.">&2
204
+
echo"Create a file called $env_file and add your environment variables to it.">&2
205
+
echo"You can also change the environment by running \`spin configure gha <environment>\`.">&2
206
+
return 1
207
+
fi
208
+
}
209
+
210
+
validate_repository_setup() {
211
+
if! repository_exists;then
212
+
echo"${BOLD}${RED}❌ Repository not detected.${RESET}"
213
+
echo"Please ensure you're in the root of your project. If you need to create a repository, run \`git init\` then \`spin gh repo create\` to create one."
214
+
return 1
215
+
fi
216
+
217
+
if! is_gh_cli_authenticated;then
218
+
echo"${BOLD}${RED}❌ GitHub CLI is not authenticated${RESET}"
219
+
echo
220
+
echo"Please authenticate with GitHub CLI by running \`spin gh auth login\`"
221
+
return 1
222
+
fi
223
+
224
+
if! is_github_repository;then
225
+
echo"${BOLD}${RED}❌ Repository is not connected to GitHub.${RESET}"
226
+
echo"This project must be connected to a GitHub repository to use GitHub Actions."
227
+
echo"Add a GitHub remote or run \`spin gh repo create\` to create a GitHub repository."
spin_remote_user="$USER"# Default to the current user who runs the command
5
-
force_ansible_upgrade=false
6
-
unprocessed_args=()
7
3
local inventory_file="${SPIN_INVENTORY_FILE:-"/etc/ansible/collections/ansible_collections/serversideup/spin/plugins/inventory/spin-dynamic-inventory.sh"}"
0 commit comments