Skip to content

Commit da4b9bc

Browse files
committed
chore: add deployment of fly.io workspace proxies
1 parent 46d95cb commit da4b9bc

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,27 @@ jobs:
482482
./build/*.deb
483483
retention-days: 7
484484

485+
deploy-wsproxies:
486+
runs-on: ubuntu-latest
487+
needs: build-main-image
488+
if: github.ref == 'refs/heads/main' && !github.event.pull_request.head.repo.fork
489+
steps:
490+
- name: Checkout
491+
uses: actions/checkout@v4
492+
with:
493+
fetch-depth: 0
494+
495+
- name: Setup flyctl
496+
uses: superfly/flyctl-actions/setup-flyctl@master
497+
498+
- name: Deploy workspace proxies
499+
run: |
500+
flyctl deploy --image ghcr.io/coder/coder-preview:main --app paris-coder -y
501+
flyctl deploy --image ghcr.io/coder/coder-preview:main --app sydney-coder -y
502+
flyctl deploy --image ghcr.io/coder/coder-preview:main --app sao-paulo-coder -y
503+
env:
504+
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
505+
485506
test-js:
486507
runs-on: ${{ github.repository_owner == 'coder' && 'buildjet-8vcpu-ubuntu-2204' || 'ubuntu-latest' }}
487508
needs: changes
@@ -772,6 +793,9 @@ jobs:
772793
docker tag ghcr.io/coder/coder-preview:main ghcr.io/coder/coder-preview:main-$tag
773794
docker push ghcr.io/coder/coder-preview:main-$tag
774795
796+
# save the image as output
797+
echo "image=ghcr.io/coder/coder-preview:main-$tag" >> $GITHUB_ENV
798+
775799
- name: Prune old images
776800
uses: vlaurin/action-ghcr-prune@v0.5.0
777801
with:

0 commit comments

Comments
 (0)