Skip to content

Commit 42cae32

Browse files
committed
Merge branch 'main' into jon/installmsg
2 parents d161287 + 46d92da commit 42cae32

File tree

583 files changed

+19918
-6815
lines changed

Some content is hidden

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

583 files changed

+19918
-6815
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ provisionersdk/proto/*.go linguist-generated=true
1212
*.tfstate.dot linguist-generated=true
1313
*.tfplan.dot linguist-generated=true
1414
site/src/api/typesGenerated.ts linguist-generated=true
15+
site/src/pages/SetupPage/countries.tsx linguist-generated=true

.github/fly-wsproxies/paris-coder.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ primary_region = "cdg"
1313
CODER_HTTP_ADDRESS = "0.0.0.0:3000"
1414
CODER_PRIMARY_ACCESS_URL = "https://dev.coder.com"
1515
CODER_WILDCARD_ACCESS_URL = "*--apps.paris.fly.dev.coder.com"
16+
CODER_VERBOSE = "true"
1617

1718
[http_service]
1819
internal_port = 3000

.github/fly-wsproxies/sao-paulo-coder.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ primary_region = "gru"
1313
CODER_HTTP_ADDRESS = "0.0.0.0:3000"
1414
CODER_PRIMARY_ACCESS_URL = "https://dev.coder.com"
1515
CODER_WILDCARD_ACCESS_URL = "*--apps.sao-paulo.fly.dev.coder.com"
16+
CODER_VERBOSE = "true"
1617

1718
[http_service]
1819
internal_port = 3000

.github/fly-wsproxies/sydney-coder.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ primary_region = "syd"
1313
CODER_HTTP_ADDRESS = "0.0.0.0:3000"
1414
CODER_PRIMARY_ACCESS_URL = "https://dev.coder.com"
1515
CODER_WILDCARD_ACCESS_URL = "*--apps.sydney.fly.dev.coder.com"
16+
CODER_VERBOSE = "true"
1617

1718
[http_service]
1819
internal_port = 3000

.github/workflows/ci.yaml

Lines changed: 45 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
fetch-depth: 1
4747
# For pull requests it's not necessary to checkout the code
4848
- name: check changed files
49-
uses: dorny/paths-filter@v2
49+
uses: dorny/paths-filter@v3
5050
id: filter
5151
with:
5252
filters: |
@@ -141,7 +141,7 @@ jobs:
141141
142142
# Check for any typos
143143
- name: Check for typos
144-
uses: crate-ci/typos@v1.17.0
144+
uses: crate-ci/typos@v1.17.2
145145
with:
146146
config: .github/workflows/typos.toml
147147

@@ -655,7 +655,7 @@ jobs:
655655
# to main branch. We are only building this for amd64 platform. (>95% pulls
656656
# are for amd64)
657657
needs: changes
658-
if: github.ref == 'refs/heads/main' && needs.changes.outputs.docs-only == 'false'
658+
if: needs.changes.outputs.docs-only == 'false' && !github.event.pull_request.head.repo.fork
659659
runs-on: ${{ github.repository_owner == 'coder' && 'buildjet-8vcpu-ubuntu-2204' || 'ubuntu-latest' }}
660660
env:
661661
DOCKER_CLI_EXPERIMENTAL: "enabled"
@@ -692,46 +692,70 @@ jobs:
692692
go mod download
693693
694694
version="$(./scripts/version.sh)"
695+
tag="main-$(echo "$version" | sed 's/+/-/g')"
696+
echo "tag=$tag" >> $GITHUB_OUTPUT
697+
695698
make gen/mark-fresh
696699
make -j \
697-
build/coder_linux_amd64 \
700+
build/coder_linux_{amd64,arm64,armv7} \
698701
build/coder_"$version"_windows_amd64.zip \
699702
build/coder_"$version"_linux_amd64.{tar.gz,deb}
700703
701-
- name: Build and Push Linux amd64 Docker Image
704+
- name: Build Linux Docker images
702705
id: build-docker
706+
env:
707+
CODER_IMAGE_BASE: ghcr.io/coder/coder-preview
708+
CODER_IMAGE_TAG_PREFIX: main
709+
DOCKER_CLI_EXPERIMENTAL: "enabled"
703710
run: |
704711
set -euxo pipefail
712+
713+
# build Docker images for each architecture
705714
version="$(./scripts/version.sh)"
706715
tag="main-$(echo "$version" | sed 's/+/-/g')"
707-
708-
export CODER_IMAGE_BUILD_BASE_TAG="$(CODER_IMAGE_BASE=coder-base ./scripts/image_tag.sh --version "$version")"
709-
./scripts/build_docker.sh \
710-
--arch amd64 \
711-
--target "ghcr.io/coder/coder-preview:$tag" \
712-
--version $version \
713-
--push \
714-
build/coder_linux_amd64
715-
716-
# Tag as main
717-
docker tag "ghcr.io/coder/coder-preview:$tag" ghcr.io/coder/coder-preview:main
718-
docker push ghcr.io/coder/coder-preview:main
719-
720-
# Store the tag in an output variable so we can use it in other jobs
721716
echo "tag=$tag" >> $GITHUB_OUTPUT
722717
718+
# build images for each architecture
719+
make -j build/coder_"$version"_linux_{amd64,arm64,armv7}.tag
720+
721+
# only push if we are on main branch
722+
if [ "${{ github.ref }}" == "refs/heads/main" ]; then
723+
# build and push multi-arch manifest, this depends on the other images
724+
# being pushed so will automatically push them
725+
make -j push/build/coder_"$version"_linux_{amd64,arm64,armv7}.tag
726+
727+
# Define specific tags
728+
tags=("$tag" "main" "latest")
729+
730+
# Create and push a multi-arch manifest for each tag
731+
# we are adding `latest` tag and keeping `main` for backward
732+
# compatibality
733+
for t in "${tags[@]}"; do
734+
./scripts/build_docker_multiarch.sh \
735+
--push \
736+
--target "ghcr.io/coder/coder-preview:$t" \
737+
--version $version \
738+
$(cat build/coder_"$version"_linux_{amd64,arm64,armv7}.tag)
739+
done
740+
fi
741+
723742
- name: Prune old images
724-
uses: vlaurin/action-ghcr-prune@v0.5.0
743+
if: github.ref == 'refs/heads/main'
744+
uses: vlaurin/action-ghcr-prune@v0.6.0
725745
with:
726746
token: ${{ secrets.GITHUB_TOKEN }}
727747
organization: coder
728748
container: coder-preview
729749
keep-younger-than: 7 # days
750+
keep-tags: latest
730751
keep-tags-regexes: ^pr
731-
prune-tags-regexes: ^main-
752+
prune-tags-regexes: |
753+
^main-
754+
^v
732755
prune-untagged: true
733756

734757
- name: Upload build artifacts
758+
if: github.ref == 'refs/heads/main'
735759
uses: actions/upload-artifact@v4
736760
with:
737761
name: coder

.github/workflows/dogfood.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,26 +58,38 @@ jobs:
5858

5959
deploy_template:
6060
needs: build_image
61-
if: github.ref == 'refs/heads/main'
6261
runs-on: ubuntu-latest
6362
steps:
6463
- name: Checkout
6564
uses: actions/checkout@v4
6665

66+
- name: Setup Terraform
67+
uses: ./.github/actions/setup-tf
68+
69+
- name: Terraform init and validate
70+
run: |
71+
cd dogfood
72+
terraform init -upgrade
73+
terraform validate
74+
6775
- name: Get short commit SHA
76+
if: github.ref == 'refs/heads/main'
6877
id: vars
6978
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
7079

7180
- name: Get latest commit title
81+
if: github.ref == 'refs/heads/main'
7282
id: message
7383
run: echo "pr_title=$(git log --format=%s -n 1 ${{ github.sha }})" >> $GITHUB_OUTPUT
7484

7585
- name: "Get latest Coder binary from the server"
86+
if: github.ref == 'refs/heads/main'
7687
run: |
7788
curl -fsSL "https://dev.coder.com/bin/coder-linux-amd64" -o "./coder"
7889
chmod +x "./coder"
7990
8091
- name: "Push template"
92+
if: github.ref == 'refs/heads/main'
8193
run: |
8294
./coder templates push $CODER_TEMPLATE_NAME --directory $CODER_TEMPLATE_DIR --yes --name=$CODER_TEMPLATE_VERSION --message="$CODER_TEMPLATE_MESSAGE" --variable jfrog_url=${{ secrets.JFROG_URL }}
8395
env:

.github/workflows/pr-auto-assign.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Assign author
17-
uses: toshimaru/auto-author-assign@v2.0.1
17+
uses: toshimaru/auto-author-assign@v2.1.0

.github/workflows/pr-deploy.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ jobs:
119119
echo "NEW=$NEW" >> $GITHUB_OUTPUT
120120
121121
- name: Check changed files
122-
uses: dorny/paths-filter@v2
122+
uses: dorny/paths-filter@v3
123123
id: filter
124124
with:
125125
base: ${{ github.ref }}
@@ -163,7 +163,7 @@ jobs:
163163
runs-on: "ubuntu-latest"
164164
steps:
165165
- name: Find Comment
166-
uses: peter-evans/find-comment@v2
166+
uses: peter-evans/find-comment@v3
167167
id: fc
168168
with:
169169
issue-number: ${{ needs.get_info.outputs.PR_NUMBER }}
@@ -173,7 +173,7 @@ jobs:
173173

174174
- name: Comment on PR
175175
id: comment_id
176-
uses: peter-evans/create-or-update-comment@v3
176+
uses: peter-evans/create-or-update-comment@v4
177177
with:
178178
comment-id: ${{ steps.fc.outputs.comment-id }}
179179
issue-number: ${{ needs.get_info.outputs.PR_NUMBER }}
@@ -441,7 +441,7 @@ jobs:
441441
echo "Slack notification sent"
442442
443443
- name: Find Comment
444-
uses: peter-evans/find-comment@v2
444+
uses: peter-evans/find-comment@v3
445445
id: fc
446446
with:
447447
issue-number: ${{ env.PR_NUMBER }}
@@ -450,7 +450,7 @@ jobs:
450450
direction: last
451451

452452
- name: Comment on PR
453-
uses: peter-evans/create-or-update-comment@v3
453+
uses: peter-evans/create-or-update-comment@v4
454454
env:
455455
STATUS: ${{ needs.get_info.outputs.NEW == 'true' && 'Created' || 'Updated' }}
456456
with:

.github/workflows/release.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ jobs:
321321

322322
- name: Start Packer builds
323323
if: ${{ !inputs.dry_run }}
324-
uses: peter-evans/repository-dispatch@v2
324+
uses: peter-evans/repository-dispatch@v3
325325
with:
326326
token: ${{ secrets.CDRCI_GITHUB_TOKEN }}
327327
repository: coder/packages
@@ -408,6 +408,11 @@ jobs:
408408
if: ${{ !inputs.dry_run }}
409409

410410
steps:
411+
- name: Sync fork
412+
run: gh repo sync cdrci/winget-pkgs -b master
413+
env:
414+
GH_TOKEN: ${{ secrets.WINGET_GH_TOKEN }}
415+
411416
- name: Checkout
412417
uses: actions/checkout@v4
413418
with:

.github/workflows/typos.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ darcula = "darcula"
1414
Hashi = "Hashi"
1515
trialer = "trialer"
1616
encrypter = "encrypter"
17-
hel = "hel" # as in helsinki
17+
hel = "hel" # as in helsinki
1818

1919
[files]
2020
extend-exclude = [
@@ -31,4 +31,5 @@ extend-exclude = [
3131
"**/*.test.tsx",
3232
"**/pnpm-lock.yaml",
3333
"tailnet/testdata/**",
34+
"site/src/pages/SetupPage/countries.tsx",
3435
]

0 commit comments

Comments
 (0)