46
46
fetch-depth : 1
47
47
# For pull requests it's not necessary to checkout the code
48
48
- name : check changed files
49
- uses : dorny/paths-filter@v2
49
+ uses : dorny/paths-filter@v3
50
50
id : filter
51
51
with :
52
52
filters : |
@@ -131,7 +131,7 @@ jobs:
131
131
echo "LINT_CACHE_DIR=$dir" >> $GITHUB_ENV
132
132
133
133
- name : golangci-lint cache
134
- uses : buildjet/cache@v3
134
+ uses : buildjet/cache@v4
135
135
with :
136
136
path : |
137
137
${{ env.LINT_CACHE_DIR }}
@@ -141,7 +141,7 @@ jobs:
141
141
142
142
# Check for any typos
143
143
- name : Check for typos
144
- uses : crate-ci/typos@v1.17.2
144
+ uses : crate-ci/typos@v1.18.0
145
145
with :
146
146
config : .github/workflows/typos.toml
147
147
@@ -305,7 +305,7 @@ jobs:
305
305
api-key : ${{ secrets.DATADOG_API_KEY }}
306
306
307
307
- name : Check code coverage
308
- uses : codecov/codecov-action@v3
308
+ uses : codecov/codecov-action@v4
309
309
# This action has a tendency to error out unexpectedly, it has
310
310
# the `fail_ci_if_error` option that defaults to `false`, but
311
311
# that is no guarantee, see:
@@ -353,7 +353,7 @@ jobs:
353
353
api-key : ${{ secrets.DATADOG_API_KEY }}
354
354
355
355
- name : Check code coverage
356
- uses : codecov/codecov-action@v3
356
+ uses : codecov/codecov-action@v4
357
357
# This action has a tendency to error out unexpectedly, it has
358
358
# the `fail_ci_if_error` option that defaults to `false`, but
359
359
# that is no guarantee, see:
@@ -412,7 +412,7 @@ jobs:
412
412
working-directory : site
413
413
414
414
- name : Check code coverage
415
- uses : codecov/codecov-action@v3
415
+ uses : codecov/codecov-action@v4
416
416
# This action has a tendency to error out unexpectedly, it has
417
417
# the `fail_ci_if_error` option that defaults to `false`, but
418
418
# that is no guarantee, see:
@@ -516,7 +516,8 @@ jobs:
516
516
NODE_OPTIONS : " --max_old_space_size=4096"
517
517
STORYBOOK : true
518
518
with :
519
- buildScriptName : " storybook:build"
519
+ # Do a fast, testing build for change previews
520
+ buildScriptName : " storybook:ci"
520
521
exitOnceUploaded : true
521
522
# This will prevent CI from failing when Chromatic detects visual changes
522
523
exitZeroOnChanges : true
@@ -530,6 +531,8 @@ jobs:
530
531
# Run TurboSnap to trace file dependencies to related stories
531
532
# and tell chromatic to only take snapshots of relevent stories
532
533
onlyChanged : true
534
+ # Avoid uploading single files, because that's very slow
535
+ zip : true
533
536
534
537
# This is a separate step for mainline only that auto accepts and changes
535
538
# instead of holding CI up. Since we squash/merge, this is defensive to
@@ -547,13 +550,16 @@ jobs:
547
550
autoAcceptChanges : true
548
551
# This will prevent CI from failing when Chromatic detects visual changes
549
552
exitZeroOnChanges : true
553
+ # Do a full build with documentation for mainline builds
550
554
buildScriptName : " storybook:build"
551
555
projectToken : 695c25b6cb65
552
556
workingDir : " ./site"
553
557
storybookBaseDir : " ./site"
554
558
# Run TurboSnap to trace file dependencies to related stories
555
559
# and tell chromatic to only take snapshots of relevent stories
556
560
onlyChanged : true
561
+ # Avoid uploading single files, because that's very slow
562
+ zip : true
557
563
558
564
offlinedocs :
559
565
name : offlinedocs
@@ -726,7 +732,7 @@ jobs:
726
732
727
733
# Define specific tags
728
734
tags=("$tag" "main" "latest")
729
-
735
+
730
736
# Create and push a multi-arch manifest for each tag
731
737
# we are adding `latest` tag and keeping `main` for backward
732
738
# compatibality
@@ -741,7 +747,7 @@ jobs:
741
747
742
748
- name : Prune old images
743
749
if : github.ref == 'refs/heads/main'
744
- uses : vlaurin/action-ghcr-prune@v0.5 .0
750
+ uses : vlaurin/action-ghcr-prune@v0.6 .0
745
751
with :
746
752
token : ${{ secrets.GITHUB_TOKEN }}
747
753
organization : coder
@@ -856,62 +862,6 @@ jobs:
856
862
TOKEN_SYDNEY : ${{ secrets.FLY_SYDNEY_CODER_PROXY_SESSION_TOKEN }}
857
863
TOKEN_SAO_PAULO : ${{ secrets.FLY_SAO_PAULO_CODER_PROXY_SESSION_TOKEN }}
858
864
859
- deploy-legacy-proxies :
860
- runs-on : ubuntu-latest
861
- timeout-minutes : 30
862
- needs : build
863
- if : github.ref == 'refs/heads/main' && !github.event.pull_request.head.repo.fork
864
- permissions :
865
- contents : read
866
- id-token : write
867
- steps :
868
- - name : Authenticate to Google Cloud
869
- uses : google-github-actions/auth@v2
870
- with :
871
- workload_identity_provider : projects/573722524737/locations/global/workloadIdentityPools/github/providers/github
872
- service_account : coder-ci@coder-dogfood.iam.gserviceaccount.com
873
-
874
- - name : Set up Google Cloud SDK
875
- uses : google-github-actions/setup-gcloud@v2
876
-
877
- - name : Download build artifacts
878
- uses : actions/download-artifact@v4
879
- with :
880
- name : coder
881
- path : ./build
882
-
883
- - name : Install Release
884
- run : |
885
- set -euo pipefail
886
-
887
- regions=(
888
- # gcp-region-id instance-name systemd-service-name
889
- "australia-southeast1-b coder-sydney coder-workspace-proxy"
890
- "europe-west3-c coder-europe coder-workspace-proxy"
891
- "southamerica-east1-b coder-brazil coder-workspace-proxy"
892
- )
893
-
894
- deb_pkg=$(find ./build -name "coder_*_linux_amd64.deb" -print -quit)
895
- if [ -z "$deb_pkg" ]; then
896
- echo "deb package $deb_pkg not found"
897
- ls -l ./build
898
- exit 1
899
- fi
900
-
901
- gcloud config set project coder-dogfood
902
- for region in "${regions[@]}"; do
903
- echo "::group::$region"
904
- set -- $region
905
-
906
- set -x
907
- gcloud config set compute/zone "$1"
908
- gcloud compute scp "$deb_pkg" "${2}:/tmp/coder.deb"
909
- gcloud compute ssh "$2" -- /bin/sh -c "set -eux; sudo dpkg -i --force-confdef /tmp/coder.deb; sudo systemctl daemon-reload; sudo service '$3' restart"
910
- set +x
911
-
912
- echo "::endgroup::"
913
- done
914
-
915
865
# sqlc-vet runs a postgres docker container, runs Coder migrations, and then
916
866
# runs sqlc-vet to ensure all queries are valid. This catches any mistakes
917
867
# in migrations or sqlc queries that makes a query unable to be prepared.
0 commit comments