Skip to content

Commit 3dbd077

Browse files
committed
Merge branch 'main' into dean/user-maintenance-window
2 parents eb1c1f6 + b73f9d8 commit 3dbd077

File tree

297 files changed

+16204
-4390
lines changed

Some content is hidden

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

297 files changed

+16204
-4390
lines changed

.github/actions/setup-node/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ runs:
66
steps:
77
- uses: buildjet/setup-node@v3
88
with:
9-
node-version: 16.16.0
9+
node-version: 16.20.1
1010
# See https://github.com/actions/setup-node#caching-global-packages-data
1111
cache: "yarn"
1212
cache-dependency-path: "site/yarn.lock"

.github/actions/setup-tf/action.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: "Setup Terraform"
2+
description: |
3+
Sets up Terraform for tests, builds, etc.
4+
runs:
5+
using: "composite"
6+
steps:
7+
- name: Install Terraform
8+
uses: hashicorp/setup-terraform@v2
9+
with:
10+
terraform_version: 1.5.2
11+
terraform_wrapper: false

.github/actions/upload-datadog/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ runs:
2020
echo "No API key provided, skipping..."
2121
exit 0
2222
fi
23-
npm install -g @datadog/datadog-ci
23+
npm install -g @datadog/datadog-ci@2.10.0
2424
datadog-ci junit upload --service coder ./gotests.xml \
2525
--tags os:${{runner.os}} --tags runner_name:${{runner.name}}
2626
env:

.github/dependabot.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ updates:
2424
update-types:
2525
- version-update:semver-minor
2626
- version-update:semver-patch
27+
groups:
28+
github-actions:
29+
patterns:
30+
- "*"
2731

2832
- package-ecosystem: "gomod"
2933
directory: "/"
@@ -39,6 +43,11 @@ updates:
3943
- dependency-name: "*"
4044
update-types:
4145
- version-update:semver-patch
46+
groups:
47+
go-otel:
48+
patterns:
49+
- "go.nhat.io/otelsql"
50+
- "go.opentelemetry.io/otel*"
4251

4352
# Update our Dockerfile.
4453
- package-ecosystem: "docker"
@@ -54,6 +63,10 @@ updates:
5463
# We need to coordinate terraform updates with the version hardcoded in
5564
# our Go code.
5665
- dependency-name: "terraform"
66+
groups:
67+
docker:
68+
patterns:
69+
- "*"
5770

5871
- package-ecosystem: "npm"
5972
directory: "/site/"
@@ -89,6 +102,10 @@ updates:
89102
ignore:
90103
# We likely want to update this ourselves.
91104
- dependency-name: "coder/coder"
105+
groups:
106+
examples-terraform:
107+
patterns:
108+
- "*"
92109

93110
# Update dogfood.
94111
- package-ecosystem: "docker"
@@ -100,6 +117,10 @@ updates:
100117
commit-message:
101118
prefix: "chore"
102119
labels: []
120+
groups:
121+
dogfood-docker:
122+
patterns:
123+
- "*"
103124

104125
- package-ecosystem: "terraform"
105126
directory: "/dogfood/"
@@ -111,4 +132,5 @@ updates:
111132
prefix: "chore"
112133
labels: []
113134
ignore:
135+
# We likely want to update this ourselves.
114136
- dependency-name: "coder/coder"

.github/workflows/ci.yaml

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ jobs:
8989
- "scripts/Dockerfile.base"
9090
- "scripts/helm.sh"
9191
ci:
92-
- ".github/**"
92+
- ".github/actions/**"
93+
- ".github/workflows/ci.yaml"
9394
- id: debug
9495
run: |
9596
echo "${{ toJSON(steps.filter )}}"
@@ -191,9 +192,7 @@ jobs:
191192
- name: Checkout
192193
uses: actions/checkout@v3
193194

194-
- uses: buildjet/setup-node@v3
195-
with:
196-
node-version: 16.16.0
195+
- uses: ./.github/actions/setup-node
197196

198197
- uses: buildjet/setup-go@v4
199198
with:
@@ -202,7 +201,16 @@ jobs:
202201
go-version: 1.20.5
203202

204203
- name: Install prettier
205-
run: npm install -g prettier
204+
# We only need prettier for fmt, so do not install all dependencies.
205+
# There is no way to install a single package with yarn, so we have to
206+
# make a new package.json with only prettier listed as a dependency.
207+
# Then running `yarn` will only install prettier.
208+
run: |
209+
cd site
210+
mv package.json package.json.bak
211+
jq '{dependencies: {prettier: .devDependencies.prettier}}' < package.json.bak > package.json
212+
yarn --frozen-lockfile
213+
mv package.json.bak package.json
206214
207215
- name: Install shfmt
208216
run: go install mvdan.cc/sh/v3/cmd/shfmt@v3.5.0
@@ -230,11 +238,7 @@ jobs:
230238
- uses: actions/checkout@v3
231239

232240
- uses: ./.github/actions/setup-go
233-
234-
- uses: hashicorp/setup-terraform@v2
235-
with:
236-
terraform_version: 1.5.1
237-
terraform_wrapper: false
241+
- uses: ./.github/actions/setup-tf
238242

239243
- name: Test with Mock Database
240244
id: test
@@ -295,11 +299,7 @@ jobs:
295299
- uses: actions/checkout@v3
296300

297301
- uses: ./.github/actions/setup-go
298-
299-
- uses: hashicorp/setup-terraform@v2
300-
with:
301-
terraform_version: 1.5.1
302-
terraform_wrapper: false
302+
- uses: ./.github/actions/setup-tf
303303

304304
- name: Test with PostgreSQL Database
305305
run: |
@@ -339,11 +339,7 @@ jobs:
339339
- uses: actions/checkout@v3
340340

341341
- uses: ./.github/actions/setup-go
342-
343-
- uses: hashicorp/setup-terraform@v2
344-
with:
345-
terraform_version: 1.5.1
346-
terraform_wrapper: false
342+
- uses: ./.github/actions/setup-tf
347343

348344
- name: Run Tests
349345
run: |
@@ -478,11 +474,7 @@ jobs:
478474

479475
- uses: ./.github/actions/setup-node
480476
- uses: ./.github/actions/setup-go
481-
482-
- uses: hashicorp/setup-terraform@v2
483-
with:
484-
terraform_version: 1.5.1
485-
terraform_wrapper: false
477+
- uses: ./.github/actions/setup-tf
486478

487479
- name: Build
488480
run: |

.github/workflows/dogfood.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ jobs:
4646
uses: docker/build-push-action@v4
4747
with:
4848
context: "{{defaultContext}}:dogfood"
49+
pull: true
4950
push: true
5051
tags: "codercom/oss-dogfood:${{ steps.docker-tag-name.outputs.tag }},codercom/oss-dogfood:latest"
5152
cache-from: type=registry,ref=codercom/oss-dogfood:latest

.github/workflows/nightly-gauntlet.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,7 @@ jobs:
1919
- uses: actions/checkout@v3
2020

2121
- uses: ./.github/actions/setup-go
22-
23-
- uses: hashicorp/setup-terraform@v2
24-
with:
25-
terraform_version: 1.1.9
26-
terraform_wrapper: false
22+
- uses: ./.github/actions/setup-tf
2723

2824
- name: Run Tests
2925
run: |

.github/workflows/pr-deploy.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,23 @@ jobs:
5858
CODER_BASE_IMAGE_TAG: ghcr.io/coder/coder-preview-base:pr${{ steps.pr_number.outputs.PR_NUMBER }}
5959
CODER_IMAGE_TAG: ghcr.io/coder/coder-preview:pr${{ steps.pr_number.outputs.PR_NUMBER }}
6060

61+
- name: Find Deploy Comment
62+
if: github.event_name == 'issue_comment'
63+
uses: peter-evans/find-comment@v2
64+
id: fco
65+
with:
66+
issue-number: ${{ steps.pr_number.outputs.PR_NUMBER }}
67+
comment-author: "github-actions[bot]"
68+
body-includes: /deploy-pr
69+
70+
- name: React with Rocket
71+
if: github.event_name == 'issue_comment'
72+
id: comment_ido
73+
uses: peter-evans/create-or-update-comment@v3
74+
with:
75+
comment-id: ${{ steps.fco.outputs.comment-id }}
76+
reactions: rocket
77+
6178
- name: Find Comment
6279
uses: peter-evans/find-comment@v2
6380
id: fc

.github/workflows/security.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ permissions:
88
on:
99
workflow_dispatch:
1010

11+
# Uncomment when testing.
12+
# pull_request:
13+
1114
schedule:
1215
# Run every 6 hours Monday-Friday!
1316
- cron: "0 0/6 * * 1-5"
@@ -119,6 +122,7 @@ jobs:
119122
120123
- name: Run Prisma Cloud image scan
121124
uses: PaloAltoNetworks/prisma-cloud-scan@v1
125+
if: false
122126
with:
123127
pcc_console_url: ${{ secrets.PRISMA_CLOUD_URL }}
124128
pcc_user: ${{ secrets.PRISMA_CLOUD_ACCESS_KEY }}

.github/workflows/stale.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
runs-on: ubuntu-latest
3434
steps:
3535
- name: Checkout repository
36-
uses: actions/checkout@v2
36+
uses: actions/checkout@v3
3737
- name: Run delete-old-branches-action
3838
uses: beatlabs/delete-old-branches-action@v0.0.10
3939
with:

0 commit comments

Comments
 (0)