35
35
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
36
36
37
37
- name : Setup Nix
38
- uses : DeterminateSystems/nix-installer-action@e50d5f73bfe71c2dd0aa4218de8f4afa59f8f81d # v16
38
+ uses : nixbuild/nix-quick-install-action@5bb6a3b3abe66fd09bbf250dce8ada94f856a703 # v30
39
+
40
+ - uses : nix-community/cache-nix-action@aee88ae5efbbeb38ac5d9862ecbebdb404a19e69 # v6.1.1
41
+ with :
42
+ # restore and save a cache using this key
43
+ primary-key : nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
44
+ # if there's no cache hit, restore a cache by this prefix
45
+ restore-prefixes-first-match : nix-${{ runner.os }}-
46
+ # collect garbage until Nix store size (in bytes) is at most this number
47
+ # before trying to save a new cache
48
+ # 1G = 1073741824
49
+ gc-max-store-size-linux : 2G
50
+ # do purge caches
51
+ purge : true
52
+ # purge all versions of the cache
53
+ purge-prefixes : nix-${{ runner.os }}-
54
+ # created more than this number of seconds ago relative to the start of the `Post Restore` phase
55
+ purge-created : 0
56
+ # except the version with the `primary-key`, if it exists
57
+ purge-primary-key : never
39
58
40
59
- name : Get branch name
41
60
id : branch-name
68
87
project : b4q6ltmpzh
69
88
token : ${{ secrets.DEPOT_TOKEN }}
70
89
buildx-fallback : true
71
- context : " {{defaultContext}}:dogfood/coder "
90
+ context : " {{defaultContext}}:dogfood/contents "
72
91
pull : true
73
92
save : true
74
93
push : ${{ github.ref == 'refs/heads/main' }}
@@ -113,18 +132,12 @@ jobs:
113
132
114
133
- name : Terraform init and validate
115
134
run : |
116
- pushd dogfood/
117
- terraform init
118
- terraform validate
119
- popd
120
- pushd dogfood/coder
121
- terraform init
135
+ cd dogfood
136
+ terraform init -upgrade
122
137
terraform validate
123
- popd
124
- pushd dogfood/coder-envbuilder
125
- terraform init
138
+ cd contents
139
+ terraform init -upgrade
126
140
terraform validate
127
- popd
128
141
129
142
- name : Get short commit SHA
130
143
if : github.ref == 'refs/heads/main'
@@ -148,6 +161,6 @@ jobs:
148
161
# Template source & details
149
162
TF_VAR_CODER_TEMPLATE_NAME : ${{ secrets.CODER_TEMPLATE_NAME }}
150
163
TF_VAR_CODER_TEMPLATE_VERSION : ${{ steps.vars.outputs.sha_short }}
151
- TF_VAR_CODER_TEMPLATE_DIR : ./coder
164
+ TF_VAR_CODER_TEMPLATE_DIR : ./contents
152
165
TF_VAR_CODER_TEMPLATE_MESSAGE : ${{ steps.message.outputs.pr_title }}
153
166
TF_LOG : info
0 commit comments