Compare commits
12
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a5050b1dfb | ||
|
|
2dc806973d | ||
|
|
ab285fedfc | ||
|
|
ea08a48286 | ||
|
|
a8aed25422 | ||
|
|
432e94c0cf | ||
|
|
f78b18d121 | ||
|
|
82e0d0e195 | ||
|
|
ad0aac7b35 | ||
|
|
ec8c148d1e | ||
|
|
ce5e355756 | ||
|
|
319b647fa9 |
No files matched your search
+19
-13
@@ -2,22 +2,22 @@ name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'templates/**'
|
||||
- 'base/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'templates/**'
|
||||
- 'base/**'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
validate:
|
||||
name: Validate templates
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: registry.bobert.me/anthorob/coder-base:terraform
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||
|
||||
- name: Setup Terraform
|
||||
uses: hashicorp/setup-terraform@dfe3c3f87815947d99a8997f908cb6525fc44e9e # v4
|
||||
|
||||
- name: Terraform validate for each template
|
||||
run: |
|
||||
@@ -32,13 +32,17 @@ jobs:
|
||||
name: Deploy templates
|
||||
needs: validate
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: registry.bobert.me/anthorob/coder-base:cli
|
||||
env:
|
||||
COMMIT_SHORT_SHA: ${{ github.sha }}
|
||||
REPO: ${{ github.repository }}
|
||||
CODER_URL: ${{ secrets.CODER_URL }}
|
||||
CODER_SESSION_TOKEN: ${{ secrets.CODER_SESSION_TOKEN }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||
|
||||
- name: Install Coder CLI
|
||||
run: |
|
||||
curl -fsSL https://coder.com/install.sh | sh
|
||||
|
||||
- name: Deploy each template
|
||||
run: |
|
||||
@@ -46,9 +50,11 @@ jobs:
|
||||
for dir in templates/*; do
|
||||
[ -d "$dir" ] || continue
|
||||
name=$(basename "$dir")
|
||||
display_name=$(echo "$name" | sed 's/.*/\u&/' | sed 's/-/ /g')
|
||||
display_name=$(echo "$name" | sed "s/.*/\u&/" | sed "s/-/ /g")
|
||||
|
||||
echo "==> deploying $name"
|
||||
coder templates push -d "$dir" --name "$short_sha" --message "Auto-deployed from $REPO on commit $short_sha" --yes "$name"
|
||||
coder templates edit "$name" --display-name "$display_name Dev Environment" --description "Development environment for $name" --icon "/icon/$name.svg" --yes
|
||||
coder templates push -d "$dir" --name "$short_sha" --message "Auto-deployed from $REPO on commit $short_sha" --yes "$name" \
|
||||
--url "$CODER_URL" --token "$CODER_SESSION_TOKEN"
|
||||
coder templates edit "$name" --display-name "$display_name Dev Environment" --description "Development environment for $name" --icon "/icon/$name.svg" --yes \
|
||||
--url "$CODER_URL" --token "$CODER_SESSION_TOKEN"
|
||||
done
|
||||
@@ -10,9 +10,9 @@ terraform {
|
||||
}
|
||||
|
||||
module "basic_workspace" {
|
||||
source = "git::https://git.bobert.me/anthorob/coder-templates.git//base?ref=main"
|
||||
source = "git::https://gitea.bobert.me/anthorob/coder-templates.git//base?ref=main"
|
||||
|
||||
docker_image = "registry.bobert.me/anthorob/coder-base:latest"
|
||||
docker_image = "gitea.bobert.me/anthorob/coder-base:latest"
|
||||
|
||||
vscode_extensions = [
|
||||
"christian-kohler.path-intellisense",
|
||||
|
||||
@@ -22,9 +22,9 @@ data "coder_parameter" "java_version" {
|
||||
}
|
||||
|
||||
module "java_workspace" {
|
||||
source = "git::https://git.bobert.me/anthorob/coder-templates.git//base?ref=main"
|
||||
source = "git::https://gitea.bobert.me/anthorob/coder-templates.git//base?ref=main"
|
||||
|
||||
docker_image = "registry.bobert.me/anthorob/coder-images:java${data.coder_parameter.java_version.value}"
|
||||
docker_image = "gitea.bobert.me/anthorob/coder-images:java${data.coder_parameter.java_version.value}"
|
||||
|
||||
language_metadata = [
|
||||
{
|
||||
|
||||
@@ -49,9 +49,9 @@ data "coder_parameter" "node_version" {
|
||||
}
|
||||
|
||||
module "php_workspace" {
|
||||
source = "git::https://git.bobert.me/anthorob/coder-templates.git//base?ref=main"
|
||||
source = "git::https://gitea.bobert.me/anthorob/coder-templates.git//base?ref=main"
|
||||
|
||||
docker_image = "registry.bobert.me/anthorob/coder-images:php${data.coder_parameter.php_version.value}"
|
||||
docker_image = "gitea.bobert.me/anthorob/coder-images:php${data.coder_parameter.php_version.value}"
|
||||
|
||||
language_metadata = [
|
||||
{
|
||||
|
||||
@@ -22,9 +22,9 @@ data "coder_parameter" "python_version" {
|
||||
}
|
||||
|
||||
module "python_workspace" {
|
||||
source = "git::https://git.bobert.me/anthorob/coder-templates.git//base?ref=main"
|
||||
source = "git::https://gitea.bobert.me/anthorob/coder-templates.git//base?ref=main"
|
||||
|
||||
docker_image = "registry.bobert.me/anthorob/coder-images:python${data.coder_parameter.python_version.value}"
|
||||
docker_image = "gitea.bobert.me/anthorob/coder-images:python${data.coder_parameter.python_version.value}"
|
||||
|
||||
language_metadata = [
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user