@@ -633,7 +633,7 @@ jobs:
633
633
# to main branch. We are only building this for amd64 platform. (>95% pulls
634
634
# are for amd64)
635
635
needs : changes
636
- if : github.ref == 'refs/heads/main' && needs.changes.outputs.docs-only == 'false'
636
+ # if: github.ref == 'refs/heads/main' && needs.changes.outputs.docs-only == 'false'
637
637
runs-on : ${{ github.repository_owner == 'coder' && 'buildjet-8vcpu-ubuntu-2204' || 'ubuntu-latest' }}
638
638
env :
639
639
DOCKER_CLI_EXPERIMENTAL : " enabled"
@@ -688,6 +688,9 @@ jobs:
688
688
docker tag "ghcr.io/coder/coder-preview:$tag" ghcr.io/coder/coder-preview:main
689
689
docker push ghcr.io/coder/coder-preview:main
690
690
691
+ # Store the tag in an output variable so we can use it in other jobs
692
+ echo "tag=$tag" >> $GITHUB_OUTPUT
693
+
691
694
- name : Prune old images
692
695
uses : vlaurin/action-ghcr-prune@v0.5.0
693
696
with :
@@ -767,11 +770,11 @@ jobs:
767
770
set -euxo pipefail
768
771
kubectl --namespace coder rollout restart deployment/coder
769
772
kubectl --namespace coder rollout status deployment/coder
770
-
773
+
771
774
deploy-wsproxies :
772
775
runs-on : ubuntu-latest
773
776
needs : build
774
- if : !github.event.pull_request.head.repo.fork
777
+ # if: github.ref == 'refs/heads/main' && !github.event.pull_request.head.repo.fork
775
778
steps :
776
779
- name : Checkout
777
780
uses : actions/checkout@v4
@@ -783,11 +786,17 @@ jobs:
783
786
784
787
- name : Deploy workspace proxies
785
788
run : |
786
- flyctl deploy --image ghcr.io/coder/coder-preview:main --app paris-coder -y
787
- flyctl deploy --image ghcr.io/coder/coder-preview:main --app sydney-coder -y
788
- flyctl deploy --image ghcr.io/coder/coder-preview:main --app sao-paulo-coder -y
789
+ flyctl deploy --image $IMAGE --app paris-coder --config ./.github/fly-wsproxies/paris-coder.toml --env CODER_PROXY_SESSION_TOKEN=$TOKEN_PARIS --yes
790
+ flyctl deploy --image $IMAGE --app sydney-coder --config ./.github/fly-wsproxies/sydney-coder.toml --env CODER_PROXY_SESSION_TOKEN=$TOKEN_SYDNEY --yes
791
+ flyctl deploy --image $IMAGE --app sao-paulo-coder --config ./.github/fly-wsproxies/sao-paulo-coder.toml --env CODER_PROXY_SESSION_TOKEN=$TOKEN_SAO_PAULO --yes
789
792
env :
790
793
FLY_API_TOKEN : ${{ secrets.FLY_API_TOKEN }}
794
+ IMAGE : " ghcr.io/coder/coder-preview:${{ needs.build.outputs.tag }}"
795
+ TOKEN_PARIS : ${{ secrets.FLY_PARIS_CODER_PROXY_SESSION_TOKEN }}
796
+ TOKEN_SYDNEY : ${{ secrets.FLY_SYDNEY_CODER_PROXY_SESSION_TOKEN }}
797
+ TOKEN_SAO_PAULO : ${{ secrets.FLY_SAO_PAULO_CODER_PROXY_SESSION_TOKEN }}
798
+
799
+
791
800
792
801
# TODO: when we remove this, instead of removing it we need to change it so it
793
802
# still upgrades workspace proxies which are not deployed on K8s
0 commit comments