Skip to content

chore: deploy workspace proxies on fly.io #10983

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Dec 4, 2023
Next Next commit
chore: add deployment of fly.io workspace proxies
  • Loading branch information
matifali committed Dec 1, 2023
commit da4b9bc7ec27cfb7c27604e50f7d756e66ce95fa
24 changes: 24 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,27 @@ jobs:
./build/*.deb
retention-days: 7

deploy-wsproxies:
runs-on: ubuntu-latest
needs: build-main-image
if: github.ref == 'refs/heads/main' && !github.event.pull_request.head.repo.fork
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup flyctl
uses: superfly/flyctl-actions/setup-flyctl@master

- name: Deploy workspace proxies
run: |
flyctl deploy --image ghcr.io/coder/coder-preview:main --app paris-coder -y
flyctl deploy --image ghcr.io/coder/coder-preview:main --app sydney-coder -y
flyctl deploy --image ghcr.io/coder/coder-preview:main --app sao-paulo-coder -y
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

test-js:
runs-on: ${{ github.repository_owner == 'coder' && 'buildjet-8vcpu-ubuntu-2204' || 'ubuntu-latest' }}
needs: changes
Expand Down Expand Up @@ -772,6 +793,9 @@ jobs:
docker tag ghcr.io/coder/coder-preview:main ghcr.io/coder/coder-preview:main-$tag
docker push ghcr.io/coder/coder-preview:main-$tag

# save the image as output
echo "image=ghcr.io/coder/coder-preview:main-$tag" >> $GITHUB_ENV

- name: Prune old images
uses: vlaurin/action-ghcr-prune@v0.5.0
with:
Expand Down