Skip to content

Commit f851f12

Browse files
committed
Merge remote-tracking branch 'origin/main' into template-push-active-options
2 parents ebdcc6c + 9810339 commit f851f12

File tree

204 files changed

+8116
-1727
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

204 files changed

+8116
-1727
lines changed

.github/workflows/ci.yaml

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,20 @@ env:
3131

3232
jobs:
3333
lint:
34-
runs-on: ${{ github.repository_owner == 'coder' && 'ubuntu-latest-8-cores' || 'ubuntu-latest' }}
34+
runs-on: ${{ github.repository_owner == 'coder' && 'buildjet-8vcpu-ubuntu-2204' || 'ubuntu-latest' }}
3535
steps:
3636
- name: Checkout
3737
uses: actions/checkout@v3
3838

3939
# Install Go!
40-
- uses: actions/setup-go@v4
40+
- uses: buildjet/setup-go@v4
4141
with:
4242
go-version: ${{ env.CODER_GO_VERSION }}
43+
cache: true
4344

4445
# Check for any typos!
4546
- name: Check for typos
46-
uses: crate-ci/typos@v1.14.10
47+
uses: crate-ci/typos@v1.14.11
4748
with:
4849
config: .github/workflows/typos.toml
4950
- name: Fix the typos
@@ -57,7 +58,7 @@ jobs:
5758
- name: Lint Go
5859
uses: golangci/golangci-lint-action@v3.3.1
5960
with:
60-
version: v1.51.0
61+
version: v1.52.2
6162

6263
- name: Lint shell scripts
6364
uses: ludeeus/action-shellcheck@2.0.0
@@ -69,7 +70,7 @@ jobs:
6970
# Lint our dashboard!
7071
- name: Cache node_modules
7172
id: cache-node
72-
uses: actions/cache@v3
73+
uses: buildjet/cache@v3
7374
with:
7475
path: |
7576
**/node_modules
@@ -132,15 +133,15 @@ jobs:
132133
133134
gen:
134135
timeout-minutes: 8
135-
runs-on: ${{ github.repository_owner == 'coder' && 'ubuntu-latest-8-cores' || 'ubuntu-latest' }}
136+
runs-on: ${{ github.repository_owner == 'coder' && 'buildjet-8vcpu-ubuntu-2204' || 'ubuntu-latest' }}
136137
needs: changes
137138
if: needs.changes.outputs.docs-only == 'false'
138139
steps:
139140
- uses: actions/checkout@v3
140141

141142
- name: Cache Node
142143
id: cache-node
143-
uses: actions/cache@v3
144+
uses: buildjet/cache@v3
144145
with:
145146
path: |
146147
**/node_modules
@@ -152,7 +153,7 @@ jobs:
152153
- name: Install node_modules
153154
run: ./scripts/yarn_install.sh
154155

155-
- uses: actions/setup-go@v4
156+
- uses: buildjet/setup-go@v4
156157
with:
157158
cache: false
158159
go-version: ${{ env.CODER_GO_VERSION }}
@@ -164,13 +165,13 @@ jobs:
164165
echo "GOMODCACHE=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT
165166
166167
- name: Go Build Cache
167-
uses: actions/cache@v3
168+
uses: buildjet/cache@v3
168169
with:
169170
path: ${{ steps.go-cache-paths.outputs.GOCACHE }}
170171
key: ${{ github.job }}-go-build-${{ hashFiles('**/go.sum', '**/**.go') }}
171172

172173
- name: Go Mod Cache
173-
uses: actions/cache@v3
174+
uses: buildjet/cache@v3
174175
with:
175176
path: ${{ steps.go-cache-paths.outputs.GOMODCACHE }}
176177
key: ${{ github.job }}-go-mod-${{ hashFiles('**/go.sum') }}
@@ -179,9 +180,9 @@ jobs:
179180
run: |
180181
curl -sSL https://github.com/kyleconroy/sqlc/releases/download/v1.17.2/sqlc_1.17.2_linux_amd64.tar.gz | sudo tar -C /usr/bin -xz sqlc
181182
- name: Install protoc-gen-go
182-
run: go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.26
183+
run: go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.30
183184
- name: Install protoc-gen-go-drpc
184-
run: go install storj.io/drpc/cmd/protoc-gen-go-drpc@v0.0.26
185+
run: go install storj.io/drpc/cmd/protoc-gen-go-drpc@v0.0.33
185186
- name: Install goimports
186187
run: go install golang.org/x/tools/cmd/goimports@latest
187188
- name: Install yq
@@ -220,7 +221,7 @@ jobs:
220221

221222
- name: Cache Node
222223
id: cache-node
223-
uses: actions/cache@v3
224+
uses: buildjet/cache@v3
224225
with:
225226
path: |
226227
**/node_modules
@@ -244,18 +245,18 @@ jobs:
244245
run: ./scripts/check_unstaged.sh
245246

246247
test-go:
247-
runs-on: ${{ matrix.os == 'ubuntu-latest' && github.repository_owner == 'coder' && 'ubuntu-latest-8-cores' || matrix.os == 'windows-2022' && github.repository_owner == 'coder' && 'windows-latest-8-cores'|| matrix.os }}
248+
runs-on: ${{ matrix.os == 'ubuntu-latest' && github.repository_owner == 'coder' && 'buildjet-4vcpu-ubuntu-2204' || matrix.os == 'windows-2019' && github.repository_owner == 'coder' && 'windows-latest-8-cores'|| matrix.os }}
248249
timeout-minutes: 20
249250
strategy:
250251
matrix:
251252
os:
252253
- ubuntu-latest
253254
- macos-latest
254-
- windows-2022
255+
- windows-2019
255256
steps:
256257
- uses: actions/checkout@v3
257258

258-
- uses: actions/setup-go@v4
259+
- uses: buildjet/setup-go@v4
259260
with:
260261
cache: false
261262
go-version: ${{ env.CODER_GO_VERSION }}
@@ -267,13 +268,13 @@ jobs:
267268
echo "GOMODCACHE=$(go env GOMODCACHE)" >> ${{ runner.os == 'Windows' && '$env:' || '$' }}GITHUB_OUTPUT
268269
269270
- name: Go Build Cache
270-
uses: actions/cache@v3
271+
uses: buildjet/cache@v3
271272
with:
272273
path: ${{ steps.go-cache-paths.outputs.GOCACHE }}
273274
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.**', '**.go') }}
274275

275276
- name: Go Mod Cache
276-
uses: actions/cache@v3
277+
uses: buildjet/cache@v3
277278
with:
278279
path: ${{ steps.go-cache-paths.outputs.GOMODCACHE }}
279280
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
@@ -335,7 +336,7 @@ jobs:
335336
flags: unittest-go-${{ matrix.os }}
336337

337338
test-go-psql:
338-
runs-on: ${{ github.repository_owner == 'coder' && 'ubuntu-latest-8-cores' || 'ubuntu-latest' }}
339+
runs-on: ${{ github.repository_owner == 'coder' && 'buildjet-8vcpu-ubuntu-2204' || 'ubuntu-latest' }}
339340
# This timeout must be greater than the timeout set by `go test` in
340341
# `make test-postgres` to ensure we receive a trace of running
341342
# goroutines. Setting this to the timeout +5m should work quite well
@@ -344,7 +345,7 @@ jobs:
344345
steps:
345346
- uses: actions/checkout@v3
346347

347-
- uses: actions/setup-go@v4
348+
- uses: buildjet/setup-go@v4
348349
with:
349350
cache: false
350351
go-version: ${{ env.CODER_GO_VERSION }}
@@ -356,13 +357,13 @@ jobs:
356357
echo "GOMODCACHE=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT
357358
358359
- name: Go Build Cache
359-
uses: actions/cache@v3
360+
uses: buildjet/cache@v3
360361
with:
361362
path: ${{ steps.go-cache-paths.outputs.GOCACHE }}
362363
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum', '**/**.go') }}
363364

364365
- name: Go Mod Cache
365-
uses: actions/cache@v3
366+
uses: buildjet/cache@v3
366367
with:
367368
path: ${{ steps.go-cache-paths.outputs.GOMODCACHE }}
368369
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
@@ -413,7 +414,7 @@ jobs:
413414

414415
deploy:
415416
name: "deploy"
416-
runs-on: ${{ github.repository_owner == 'coder' && 'ubuntu-latest-8-cores' || 'ubuntu-latest' }}
417+
runs-on: ${{ github.repository_owner == 'coder' && 'buildjet-8vcpu-ubuntu-2204' || 'ubuntu-latest' }}
417418
timeout-minutes: 30
418419
needs: changes
419420
if: |
@@ -436,7 +437,7 @@ jobs:
436437
- name: Set up Google Cloud SDK
437438
uses: google-github-actions/setup-gcloud@v1
438439

439-
- uses: actions/setup-go@v4
440+
- uses: buildjet/setup-go@v4
440441
with:
441442
cache: false
442443
go-version: ${{ env.CODER_GO_VERSION }}
@@ -448,20 +449,20 @@ jobs:
448449
echo "GOMODCACHE=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT
449450
450451
- name: Go Build Cache
451-
uses: actions/cache@v3
452+
uses: buildjet/cache@v3
452453
with:
453454
path: ${{ steps.go-cache-paths.outputs.GOCACHE }}
454455
key: ${{ runner.os }}-release-go-build-${{ hashFiles('**/go.sum') }}
455456

456457
- name: Go Mod Cache
457-
uses: actions/cache@v3
458+
uses: buildjet/cache@v3
458459
with:
459460
path: ${{ steps.go-cache-paths.outputs.GOMODCACHE }}
460461
key: ${{ runner.os }}-release-go-mod-${{ hashFiles('**/go.sum') }}
461462

462463
- name: Cache Node
463464
id: cache-node
464-
uses: actions/cache@v3
465+
uses: buildjet/cache@v3
465466
with:
466467
path: |
467468
**/node_modules
@@ -532,14 +533,14 @@ jobs:
532533
retention-days: 7
533534

534535
test-js:
535-
runs-on: ${{ github.repository_owner == 'coder' && 'ubuntu-latest-8-cores' || 'ubuntu-latest' }}
536+
runs-on: ${{ github.repository_owner == 'coder' && 'buildjet-8vcpu-ubuntu-2204' || 'ubuntu-latest' }}
536537
timeout-minutes: 20
537538
steps:
538539
- uses: actions/checkout@v3
539540

540541
- name: Cache Node
541542
id: cache-node
542-
uses: actions/cache@v3
543+
uses: buildjet/cache@v3
543544
with:
544545
path: |
545546
**/node_modules
@@ -548,7 +549,7 @@ jobs:
548549
restore-keys: |
549550
js-${{ runner.os }}-
550551
551-
- uses: actions/setup-node@v3
552+
- uses: buildjet/setup-node@v3
552553
with:
553554
node-version: "16.16.0"
554555

@@ -574,21 +575,21 @@ jobs:
574575
needs:
575576
- changes
576577
if: needs.changes.outputs.docs-only == 'false'
577-
runs-on: ${{ github.repository_owner == 'coder' && 'ubuntu-latest-8-cores' || 'ubuntu-latest' }}
578+
runs-on: ${{ github.repository_owner == 'coder' && 'buildjet-8vcpu-ubuntu-2204' || 'ubuntu-latest' }}
578579
timeout-minutes: 20
579580
steps:
580581
- uses: actions/checkout@v3
581582

582583
- name: Cache Node
583584
id: cache-node
584-
uses: actions/cache@v3
585+
uses: buildjet/cache@v3
585586
with:
586587
path: |
587588
**/node_modules
588589
.eslintcache
589590
key: js-${{ runner.os }}-e2e-${{ hashFiles('**/yarn.lock') }}
590591

591-
- uses: actions/setup-go@v4
592+
- uses: buildjet/setup-go@v4
592593
with:
593594
cache: false
594595
go-version: ${{ env.CODER_GO_VERSION }}
@@ -598,7 +599,7 @@ jobs:
598599
terraform_version: 1.1.9
599600
terraform_wrapper: false
600601

601-
- uses: actions/setup-node@v3
602+
- uses: buildjet/setup-node@v3
602603
with:
603604
node-version: "16.16.0"
604605

@@ -609,13 +610,13 @@ jobs:
609610
echo "GOMODCACHE=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT
610611
611612
- name: Go Build Cache
612-
uses: actions/cache@v3
613+
uses: buildjet/cache@v3
613614
with:
614615
path: ${{ steps.go-cache-paths.outputs.GOCACHE }}
615616
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
616617

617618
- name: Go Mod Cache
618-
uses: actions/cache@v3
619+
uses: buildjet/cache@v3
619620
with:
620621
path: ${{ steps.go-cache-paths.outputs.GOMODCACHE }}
621622
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
@@ -654,7 +655,7 @@ jobs:
654655
# only get 1 commit on shallow checkout.
655656
fetch-depth: 0
656657

657-
- uses: actions/setup-node@v3
658+
- uses: buildjet/setup-node@v3
658659
with:
659660
node-version: "16.16.0"
660661

.github/workflows/contrib.yaml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,6 @@ jobs:
4747
branch: "main"
4848
allowlist: dependabot*
4949

50-
title:
51-
runs-on: ubuntu-latest
52-
if: github.event_name == 'pull_request_target'
53-
steps:
54-
- name: Validate PR title
55-
uses: amannn/action-semantic-pull-request@v5
56-
env:
57-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58-
with:
59-
requireScope: false
60-
6150
release-labels:
6251
runs-on: ubuntu-latest
6352
# Depend on lint so that title is Conventional Commits-compatible.

.github/workflows/dogfood.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ jobs:
4949
cache-from: type=registry,ref=codercom/oss-dogfood:latest
5050
cache-to: type=inline
5151
deploy_template:
52+
needs: deploy_image
5253
runs-on: ubuntu-latest
5354
steps:
5455
- name: Checkout

.github/workflows/release.yaml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ on:
66
- "v*"
77
workflow_dispatch:
88
inputs:
9-
# For some reason, setup-go won't actually pick up a new patch version if
10-
# it has an old one cached. We need to manually specify the versions so we
11-
# can get the latest release. Never use "~1.xx" here!
129
go_version:
1310
description: "Go version to use for building."
1411
required: false
@@ -35,11 +32,15 @@ env:
3532
# https://github.blog/changelog/2022-06-10-github-actions-inputs-unified-across-manual-and-reusable-workflows/
3633
CODER_RELEASE: ${{ !inputs.dry_run }}
3734
CODER_DRY_RUN: ${{ inputs.dry_run }}
35+
# For some reason, setup-go won't actually pick up a new patch version if
36+
# it has an old one cached. We need to manually specify the versions so we
37+
# can get the latest release. Never use "~1.xx" here!
38+
CODER_GO_VERSION: "1.20.4"
3839

3940
jobs:
4041
release:
4142
name: Build and publish
42-
runs-on: ${{ github.repository_owner == 'coder' && 'ubuntu-latest-8-cores' || 'ubuntu-latest' }}
43+
runs-on: ${{ github.repository_owner == 'coder' && 'buildjet-8vcpu-ubuntu-2204' || 'ubuntu-latest' }}
4344
env:
4445
# Necessary for Docker manifest
4546
DOCKER_CLI_EXPERIMENTAL: "enabled"
@@ -97,13 +98,14 @@ jobs:
9798
username: ${{ github.actor }}
9899
password: ${{ secrets.GITHUB_TOKEN }}
99100

100-
- uses: actions/setup-go@v4
101+
- uses: buildjet/setup-go@v4
101102
with:
102-
go-version: ${{ inputs.go_version }}
103+
go-version: ${{ env.CODER_GO_VERSION }}
104+
cache: true
103105

104106
- name: Cache Node
105107
id: cache-node
106-
uses: actions/cache@v3
108+
uses: buildjet/cache@v3
107109
with:
108110
path: |
109111
**/node_modules

0 commit comments

Comments
 (0)