Compare commits
5
Commits
f78b18d121
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2dc806973d | ||
|
|
ab285fedfc | ||
|
|
ea08a48286 | ||
|
|
a8aed25422 | ||
|
|
432e94c0cf |
@@ -2,10 +2,8 @@ name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'templates/**'
|
||||
- 'base/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'templates/**'
|
||||
- 'base/**'
|
||||
@@ -19,7 +17,7 @@ jobs:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||
|
||||
- name: Setup Terraform
|
||||
uses: hashicorp/setup-terraform@v2
|
||||
uses: hashicorp/setup-terraform@5e8dbf3c6d9deaf4193ca7a8fb23f2ac83bb6c85 # v4
|
||||
|
||||
- name: Terraform validate for each template
|
||||
run: |
|
||||
@@ -37,6 +35,8 @@ jobs:
|
||||
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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||
|
||||
@@ -53,6 +53,8 @@ jobs:
|
||||
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
|
||||
Reference in new issue
Block a user