Skip to content

Commit 7d0a754

Browse files
ci: Fix collab deploys (#18077)
This PR fixes issues with deploying collab. We reverted 4882a75—as the DigitalOcean runners are gone now—and moved back to BuildJet. We needed to make some changes to the deployment jobs to setup `doctl`. This PR also adds an automatic bump of the `collab-staging` tag on merges to `main`. This should help catch issues with collab deploys earlier. Release Notes: - N/A --------- Co-authored-by: Conrad <conrad@zed.dev>
1 parent a944bb2 commit 7d0a754

File tree

2 files changed

+39
-7
lines changed

2 files changed

+39
-7
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Bump collab-staging Tag
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
update-collab-staging-tag:
10+
if: github.repository_owner == 'zed-industries'
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Update collab-staging tag
19+
run: |
20+
git config user.name github-actions
21+
git config user.email github-actions@github.com
22+
git tag -f collab-staging
23+
git push origin collab-staging --force

.github/workflows/deploy_collab.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ on:
88

99
env:
1010
DOCKER_BUILDKIT: 1
11-
DIGITALOCEAN_ACCESS_TOKEN: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
1211

1312
jobs:
1413
style:
@@ -61,11 +60,12 @@ jobs:
6160
- style
6261
- tests
6362
runs-on:
64-
- self-hosted
65-
- deploy
63+
- buildjet-16vcpu-ubuntu-2204
6664
steps:
67-
- name: Add Rust to the PATH
68-
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
65+
- name: Install doctl
66+
uses: digitalocean/action-doctl@v2
67+
with:
68+
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
6969

7070
- name: Sign into DigitalOcean docker registry
7171
run: doctl registry login
@@ -89,10 +89,19 @@ jobs:
8989
needs:
9090
- publish
9191
runs-on:
92-
- self-hosted
93-
- deploy
92+
- buildjet-16vcpu-ubuntu-2204
9493

9594
steps:
95+
- name: Checkout repo
96+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
97+
with:
98+
clean: false
99+
100+
- name: Install doctl
101+
uses: digitalocean/action-doctl@v2
102+
with:
103+
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
104+
96105
- name: Sign into Kubernetes
97106
run: doctl kubernetes cluster kubeconfig save --expiry-seconds 600 ${{ secrets.CLUSTER_NAME }}
98107

0 commit comments

Comments
 (0)