Add Gitea Key

This commit is contained in:
2023-06-28 04:16:04 +00:00
parent cb2b52880c
commit 5b454f9eff
2 changed files with 8 additions and 3 deletions
+8 -2
View File
@@ -40,6 +40,12 @@ variable "waka_api_key" {
sensitive = true
}
variable "gitea_key" {
description = "Access Key for Gitea"
type = string
sensitive = true
}
data "coder_parameter" "git_repo" {
name = "git_repo"
display_name= "Git Repo"
@@ -91,9 +97,9 @@ resource "coder_agent" "main" {
curl -fsSL https://gitea.nicholaspease.com/npease/CoderTemplatesV2/raw/branch/main/container-scripts/${data.coder_parameter.language.value}.sh | sh
# WakaAPI Setup
echo "[settings]" >> ~/.wakatime.cfg && echo "api_url = ${var.waka_api_url}" >> ~/.wakatime.cfg && echo "api_key = ${var.waka_api_key}" >> ~/.wakatime.cfg
# Clone Git Repo
# Clone Git Repo && Setup Auto Git Login
git config --global url."https://api:${var.gitea_key}@gitea.nicholaspease.com/".insteadOf "https://gitea.nicholaspease.com/"
cd ~/
if [ "${data.coder_parameter.git_repo.value}" != " " ] && [ ! -d "${data.coder_workspace.me.name}" ]
then
git clone ${data.coder_parameter.git_repo.value}
-1
View File
@@ -1 +0,0 @@
git config --global url."https://api:$MY_GIT_TOKEN@gitea.nicholaspease.com/".insteadOf "https://gitea.nicholaspease.com/"