Skip to content

Commit 3bab064

Browse files
authored
Merge branch 'main' into atif/typos-vscode
2 parents ef5afa1 + 040e5cf commit 3bab064

File tree

297 files changed

+8124
-2107
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

+8124
-2107
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: |
44
inputs:
55
version:
66
description: "The Go version to use."
7-
default: "1.22.6"
7+
default: "1.22.8"
88
runs:
99
using: "composite"
1010
steps:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ runs:
77
- name: Install Terraform
88
uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
99
with:
10-
terraform_version: 1.9.2
10+
terraform_version: 1.9.8
1111
terraform_wrapper: false

.github/workflows/ci.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ jobs:
197197
198198
# Check for any typos
199199
- name: Check for typos
200-
uses: crate-ci/typos@6802cc60d4e7f78b9d5454f6cf3935c042d5e1e3 # v1.26.0
200+
uses: crate-ci/typos@0d9e0c2c1bd7f770f6eb90f87780848ca02fc12c # v1.26.8
201201
with:
202202
config: .github/workflows/typos.toml
203203

@@ -233,8 +233,7 @@ jobs:
233233
gen:
234234
timeout-minutes: 8
235235
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-latest' }}
236-
needs: changes
237-
if: needs.changes.outputs.docs-only == 'false' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
236+
if: always()
238237
steps:
239238
- name: Harden Runner
240239
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1

.github/workflows/docker-base.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,18 @@ on:
2222

2323
permissions:
2424
contents: read
25-
# Necessary to push docker images to ghcr.io.
26-
packages: write
27-
# Necessary for depot.dev authentication.
28-
id-token: write
2925

3026
# Avoid running multiple jobs for the same commit.
3127
concurrency:
3228
group: ${{ github.workflow }}-${{ github.ref }}-docker-base
3329

3430
jobs:
3531
build:
32+
permissions:
33+
# Necessary for depot.dev authentication.
34+
id-token: write
35+
# Necessary to push docker images to ghcr.io.
36+
packages: write
3637
runs-on: ubuntu-latest
3738
if: github.repository_owner == 'coder'
3839
steps:

.github/workflows/nightly-gauntlet.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
# Every day at midnight
77
- cron: "0 0 * * *"
88
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
913
jobs:
1014
go-race:
1115
# While GitHub's toaster runners are likelier to flake, we want consistency

.github/workflows/pr-cleanup.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ on:
88
description: "PR number"
99
required: true
1010

11-
permissions:
12-
packages: write
13-
1411
jobs:
1512
cleanup:
1613
runs-on: "ubuntu-latest"
14+
permissions:
15+
# Necessary to delete docker images from ghcr.io.
16+
packages: write
1717
steps:
1818
- name: Harden Runner
1919
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1

.github/workflows/pr-deploy.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ env:
3030

3131
permissions:
3232
contents: read
33-
packages: write
34-
pull-requests: write # needed for commenting on PRs
3533

3634
jobs:
3735
check_pr:
@@ -171,6 +169,8 @@ jobs:
171169
needs: get_info
172170
if: needs.get_info.outputs.BUILD == 'true' || github.event.inputs.deploy == 'true'
173171
runs-on: "ubuntu-latest"
172+
permissions:
173+
pull-requests: write # needed for commenting on PRs
174174
steps:
175175
- name: Harden Runner
176176
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
@@ -205,6 +205,9 @@ jobs:
205205
# Run build job only if there are changes in the files that we care about or if the workflow is manually triggered with --build flag
206206
if: needs.get_info.outputs.BUILD == 'true'
207207
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-latest' }}
208+
permissions:
209+
# Necessary to push docker images to ghcr.io.
210+
packages: write
208211
# This concurrency only cancels build jobs if a new build is triggred. It will avoid cancelling the current deployemtn in case of docs chnages.
209212
concurrency:
210213
group: build-${{ github.workflow }}-${{ github.ref }}-${{ needs.get_info.outputs.BUILD }}
@@ -425,7 +428,7 @@ jobs:
425428
--first-user-username coder \
426429
--first-user-email pr${{ env.PR_NUMBER }}@coder.com \
427430
--first-user-password $password \
428-
--first-user-trial \
431+
--first-user-trial=false \
429432
--use-token-as-session \
430433
https://${{ env.PR_HOSTNAME }}
431434

.github/workflows/release-validation.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
tags:
66
- "v*"
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
network-performance:
1013
runs-on: ubuntu-latest

.github/workflows/release.yaml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,7 @@ on:
1818
default: false
1919

2020
permissions:
21-
# Required to publish a release
22-
contents: write
23-
# Necessary to push docker images to ghcr.io.
24-
packages: write
25-
# Necessary for GCP authentication (https://github.com/google-github-actions/setup-gcloud#usage)
26-
id-token: write
21+
contents: read
2722

2823
concurrency: ${{ github.workflow }}-${{ github.ref }}
2924

@@ -40,6 +35,13 @@ jobs:
4035
release:
4136
name: Build and publish
4237
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-latest' }}
38+
permissions:
39+
# Required to publish a release
40+
contents: write
41+
# Necessary to push docker images to ghcr.io.
42+
packages: write
43+
# Necessary for GCP authentication (https://github.com/google-github-actions/setup-gcloud#usage)
44+
id-token: write
4345
env:
4446
# Necessary for Docker manifest
4547
DOCKER_CLI_EXPERIMENTAL: "enabled"

.github/workflows/scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,6 @@ jobs:
4747

4848
# Upload the results to GitHub's code scanning dashboard.
4949
- name: "Upload to code-scanning"
50-
uses: github/codeql-action/upload-sarif@f779452ac5af1c261dce0346a8f964149f49322b # v3.26.13
50+
uses: github/codeql-action/upload-sarif@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
5151
with:
5252
sarif_file: results.sarif

.github/workflows/security.yaml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name: "security"
33
permissions:
44
actions: read
55
contents: read
6-
security-events: write
76

87
on:
98
workflow_dispatch:
@@ -23,6 +22,8 @@ concurrency:
2322

2423
jobs:
2524
codeql:
25+
permissions:
26+
security-events: write
2627
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-latest' }}
2728
steps:
2829
- name: Harden Runner
@@ -37,7 +38,7 @@ jobs:
3738
uses: ./.github/actions/setup-go
3839

3940
- name: Initialize CodeQL
40-
uses: github/codeql-action/init@f779452ac5af1c261dce0346a8f964149f49322b # v3.26.13
41+
uses: github/codeql-action/init@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
4142
with:
4243
languages: go, javascript
4344

@@ -47,7 +48,7 @@ jobs:
4748
rm Makefile
4849
4950
- name: Perform CodeQL Analysis
50-
uses: github/codeql-action/analyze@f779452ac5af1c261dce0346a8f964149f49322b # v3.26.13
51+
uses: github/codeql-action/analyze@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
5152

5253
- name: Send Slack notification on failure
5354
if: ${{ failure() }}
@@ -61,6 +62,8 @@ jobs:
6162
"${{ secrets.SLACK_SECURITY_FAILURE_WEBHOOK_URL }}"
6263
6364
trivy:
65+
permissions:
66+
security-events: write
6467
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-latest' }}
6568
steps:
6669
- name: Harden Runner
@@ -95,13 +98,20 @@ jobs:
9598
# protoc must be in lockstep with our dogfood Dockerfile or the
9699
# version in the comments will differ. This is also defined in
97100
# ci.yaml.
98-
set -x
101+
set -euxo pipefail
99102
cd dogfood/contents
103+
mkdir -p /usr/local/bin
104+
mkdir -p /usr/local/include
105+
100106
DOCKER_BUILDKIT=1 docker build . --target proto -t protoc
101107
protoc_path=/usr/local/bin/protoc
102108
docker run --rm --entrypoint cat protoc /tmp/bin/protoc > $protoc_path
103109
chmod +x $protoc_path
104110
protoc --version
111+
# Copy the generated files to the include directory.
112+
docker run --rm -v /usr/local/include:/target protoc cp -r /tmp/include/google /target/
113+
ls -la /usr/local/include/google/protobuf/
114+
stat /usr/local/include/google/protobuf/timestamp.proto
105115
106116
- name: Build Coder linux amd64 Docker image
107117
id: build
@@ -132,7 +142,7 @@ jobs:
132142
severity: "CRITICAL,HIGH"
133143

134144
- name: Upload Trivy scan results to GitHub Security tab
135-
uses: github/codeql-action/upload-sarif@f779452ac5af1c261dce0346a8f964149f49322b # v3.26.13
145+
uses: github/codeql-action/upload-sarif@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
136146
with:
137147
sarif_file: trivy-results.sarif
138148
category: "Trivy"

.github/workflows/stale.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
1-
name: Stale Issue, Banch and Old Workflows Cleanup
1+
name: Stale Issue, Branch and Old Workflows Cleanup
22
on:
33
schedule:
44
# Every day at midnight
55
- cron: "0 0 * * *"
66
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
711
jobs:
812
issues:
913
runs-on: ubuntu-latest
1014
permissions:
15+
# Needed to close issues.
1116
issues: write
17+
# Needed to close PRs.
1218
pull-requests: write
13-
actions: write
1419
steps:
1520
- name: Harden Runner
1621
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
@@ -86,6 +91,9 @@ jobs:
8691
8792
branches:
8893
runs-on: ubuntu-latest
94+
permissions:
95+
# Needed to delete branches.
96+
contents: write
8997
steps:
9098
- name: Harden Runner
9199
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
@@ -105,6 +113,9 @@ jobs:
105113
exclude_open_pr_branches: true
106114
del_runs:
107115
runs-on: ubuntu-latest
116+
permissions:
117+
# Needed to delete workflow runs.
118+
actions: write
108119
steps:
109120
- name: Harden Runner
110121
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,6 @@ result
7171

7272
# pnpm
7373
.pnpm-store/
74+
75+
# Zed
76+
.zed_server

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ result
7474

7575
# pnpm
7676
.pnpm-store/
77+
78+
# Zed
79+
.zed_server
7780
# .prettierignore.include:
7881
# Helm templates contain variables that are invalid YAML and can't be formatted
7982
# by Prettier.

0 commit comments

Comments
 (0)