56
56
project : b4q6ltmpzh
57
57
token : ${{ secrets.DEPOT_TOKEN }}
58
58
buildx-fallback : true
59
- context : " {{defaultContext}}:dogfood"
59
+ context : " {{defaultContext}}:dogfood/contents "
60
60
pull : true
61
61
save : true
62
62
push : ${{ github.ref == 'refs/heads/main' }}
69
69
token : ${{ secrets.DEPOT_TOKEN }}
70
70
buildx-fallback : true
71
71
context : " ."
72
- file : " dogfood/Dockerfile.nix"
72
+ file : " dogfood/contents/ Dockerfile.nix"
73
73
pull : true
74
74
save : true
75
75
push : ${{ github.ref == 'refs/heads/main' }}
90
90
cd dogfood
91
91
terraform init -upgrade
92
92
terraform validate
93
+ cd contents
94
+ terraform init -upgrade
95
+ terraform validate
93
96
94
97
- name : Get short commit SHA
95
98
if : github.ref == 'refs/heads/main'
@@ -101,22 +104,17 @@ jobs:
101
104
id : message
102
105
run : echo "pr_title=$(git log --format=%s -n 1 ${{ github.sha }})" >> $GITHUB_OUTPUT
103
106
104
- - name : " Get latest Coder binary from the server"
105
- if : github.ref == 'refs/heads/main'
106
- run : |
107
- curl -fsSL "https://dev.coder.com/bin/coder-linux-amd64" -o "./coder"
108
- chmod +x "./coder"
109
-
110
107
- name : " Push template"
111
108
if : github.ref == 'refs/heads/main'
112
109
run : |
113
- ./coder templates push $CODER_TEMPLATE_NAME --directory $CODER_TEMPLATE_DIR --yes --name=$CODER_TEMPLATE_VERSION --message="$CODER_TEMPLATE_MESSAGE"
110
+ cd dogfood
111
+ terraform apply -auto-approve
114
112
env :
115
113
# Consumed by Coder CLI
116
114
CODER_URL : https://dev.coder.com
117
115
CODER_SESSION_TOKEN : ${{ secrets.CODER_SESSION_TOKEN }}
118
116
# Template source & details
119
- CODER_TEMPLATE_NAME : ${{ secrets.CODER_TEMPLATE_NAME }}
120
- CODER_TEMPLATE_VERSION : ${{ steps.vars.outputs.sha_short }}
121
- CODER_TEMPLATE_DIR : ./dogfood
122
- CODER_TEMPLATE_MESSAGE : ${{ steps.message.outputs.pr_title }}
117
+ TF_VAR_CODER_TEMPLATE_NAME : ${{ secrets.CODER_TEMPLATE_NAME }}
118
+ TF_VAR_CODER_TEMPLATE_VERSION : ${{ steps.vars.outputs.sha_short }}
119
+ TF_VAR_CODER_TEMPLATE_DIR : ./contents
120
+ TF_VAR_CODER_TEMPLATE_MESSAGE : ${{ steps.message.outputs.pr_title }}
0 commit comments