Skip to content

Commit 41726a7

Browse files
authored
chore: fix ci.yaml deploy step for other regions (#7367)
1 parent 1406374 commit 41726a7

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/ci.yaml

+10-1
Original file line numberDiff line numberDiff line change
@@ -497,14 +497,23 @@ jobs:
497497
"southamerica-east1-b coder-brazil coder-proxy"
498498
)
499499
500+
deb_pkg="./build/coder_$(./scripts/version.sh)_linux_amd64.deb"
501+
if [ ! -f "$deb_pkg" ]; then
502+
echo "deb package not found: $deb_pkg"
503+
ls -l ./build
504+
exit 1
505+
fi
506+
500507
gcloud config set project coder-dogfood
501508
for region in "${regions[@]}"; do
502509
echo "::group::$region"
503510
set -- $region
504511
512+
set -x
505513
gcloud config set compute/zone "$1"
506-
gcloud compute scp ./build/coder_*_linux_amd64.deb "$2":/tmp/coder.deb
514+
gcloud compute scp "$deb_pkg" "${2}:/tmp/coder.deb"
507515
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"
516+
set +x
508517
509518
echo "::endgroup::"
510519
done

0 commit comments

Comments
 (0)