testing simple coder script
parent
abb51a37e1
commit
936040afae
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="92pt" height="92pt" viewBox="0 0 92 92"><defs><clipPath id="a"><path d="M0 .113h91.887V92H0Zm0 0"/></clipPath></defs><g clip-path="url(#a)"><path style="stroke:none;fill-rule:nonzero;fill:#f03c2e;fill-opacity:1" d="M90.156 41.965 50.036 1.848a5.918 5.918 0 0 0-8.372 0l-8.328 8.332 10.566 10.566a7.03 7.03 0 0 1 7.23 1.684 7.034 7.034 0 0 1 1.669 7.277l10.187 10.184a7.028 7.028 0 0 1 7.278 1.672 7.04 7.04 0 0 1 0 9.957 7.05 7.05 0 0 1-9.965 0 7.044 7.044 0 0 1-1.528-7.66l-9.5-9.497V59.36a7.04 7.04 0 0 1 1.86 11.29 7.04 7.04 0 0 1-9.957 0 7.04 7.04 0 0 1 0-9.958 7.06 7.06 0 0 1 2.304-1.539V33.926a7.049 7.049 0 0 1-3.82-9.234L29.242 14.272 1.73 41.777a5.925 5.925 0 0 0 0 8.371L41.852 90.27a5.925 5.925 0 0 0 8.37 0l39.934-39.934a5.925 5.925 0 0 0 0-8.371"/></g></svg>
|
After Width: | Height: | Size: 819 B |
@ -0,0 +1,12 @@
|
||||
---
|
||||
display_name: Git Config
|
||||
description: Stores Git configuration from Coder credentials
|
||||
icon: ../.icons/git.svg
|
||||
maintainer_github: coder
|
||||
verified: true
|
||||
tags: [helper]
|
||||
---
|
||||
|
||||
# git-config
|
||||
|
||||
Runs a script that checks for stored Git credentials, populating them with coder credentials when missing.
|
@ -0,0 +1,29 @@
|
||||
terraform {
|
||||
required_version = ">= 1.0"
|
||||
|
||||
required_providers {
|
||||
coder = {
|
||||
source = "coder/coder"
|
||||
version = ">= 0.12"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
variable "agent_id" {
|
||||
type = string
|
||||
description = "The ID of a Coder agent."
|
||||
}
|
||||
|
||||
# variable "path" {
|
||||
# type = string
|
||||
# description = "The path to a script that will be ran on start enabling a user to personalize their workspace."
|
||||
# default = "~/personalize"
|
||||
# }
|
||||
|
||||
resource "coder_script" "personalize" {
|
||||
agent_id = var.agent_id
|
||||
script = templatefile("${path.module}/run.sh")
|
||||
display_name = "Git Config"
|
||||
icon = "/emojis/1f58c.png" # TODO: test if the local git icon works
|
||||
run_on_start = true
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
|
||||
BOLD='\033[0;1m'
|
||||
CODE='\033[36;40;1m'
|
||||
RESET='\033[0m'
|
||||
|
||||
printf "✨ $${BOLD}Running git config script!\n\n"
|
Loading…
Reference in New Issue