Compare commits
1
Commits
main
..
327bdb98b2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
327bdb98b2 |
+9
-11
@@ -2,8 +2,10 @@ name: CI
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
paths:
|
||||||
- main
|
- 'templates/**'
|
||||||
|
- 'base/**'
|
||||||
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- 'templates/**'
|
- 'templates/**'
|
||||||
- 'base/**'
|
- 'base/**'
|
||||||
@@ -14,10 +16,10 @@ jobs:
|
|||||||
name: Validate templates
|
name: Validate templates
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||||
|
|
||||||
- name: Setup Terraform
|
- name: Setup Terraform
|
||||||
uses: hashicorp/setup-terraform@5e8dbf3c6d9deaf4193ca7a8fb23f2ac83bb6c85 # v4
|
uses: hashicorp/setup-terraform@633666f66e0061ca3b725c73b2ec20cd13a8fdd1 # v2
|
||||||
|
|
||||||
- name: Terraform validate for each template
|
- name: Terraform validate for each template
|
||||||
run: |
|
run: |
|
||||||
@@ -35,10 +37,8 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
COMMIT_SHORT_SHA: ${{ github.sha }}
|
COMMIT_SHORT_SHA: ${{ github.sha }}
|
||||||
REPO: ${{ github.repository }}
|
REPO: ${{ github.repository }}
|
||||||
CODER_URL: ${{ secrets.CODER_URL }}
|
|
||||||
CODER_SESSION_TOKEN: ${{ secrets.CODER_SESSION_TOKEN }}
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||||
|
|
||||||
- name: Install Coder CLI
|
- name: Install Coder CLI
|
||||||
run: |
|
run: |
|
||||||
@@ -53,8 +53,6 @@ jobs:
|
|||||||
display_name=$(echo "$name" | sed "s/.*/\u&/" | sed "s/-/ /g")
|
display_name=$(echo "$name" | sed "s/.*/\u&/" | sed "s/-/ /g")
|
||||||
|
|
||||||
echo "==> deploying $name"
|
echo "==> deploying $name"
|
||||||
coder templates push -d "$dir" --name "$short_sha" --message "Auto-deployed from $REPO on commit $short_sha" --yes "$name" \
|
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
|
||||||
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
|
done
|
||||||
Reference in new issue
Block a user