ci: Move collab to Dockerfile-collab (#18515)

Peter Tripp created

This makes it possible to have multiple Dockerfiles, each with their own
`.dockerignore`. Previously any docker builds would always include
anything inside `.dockerignore`. I believe this feature may require
`export DOCKER_BUILDKIT=1` but we use that in CI already.

Change summary

.github/workflows/deploy_collab.yml | 6 +++++-
.zed/settings.json                  | 4 ++++
Dockerfile-collab                   | 0 
Dockerfile-collab.dockerignore      | 0 
4 files changed, 9 insertions(+), 1 deletion(-)

Detailed changes

.github/workflows/deploy_collab.yml 🔗

@@ -76,7 +76,11 @@ jobs:
           clean: false
 
       - name: Build docker image
-        run: docker build . --build-arg GITHUB_SHA=$GITHUB_SHA --tag registry.digitalocean.com/zed/collab:$GITHUB_SHA
+        run: |
+          docker build -f Dockerfile-collab \
+            --build-arg GITHUB_SHA=$GITHUB_SHA \
+            --tag registry.digitalocean.com/zed/collab:$GITHUB_SHA \
+            .
 
       - name: Publish docker image
         run: docker push registry.digitalocean.com/zed/collab:${GITHUB_SHA}

.zed/settings.json 🔗

@@ -38,6 +38,10 @@
       }
     }
   },
+  "file_types": {
+    "Dockerfile": ["Dockerfile*[!dockerignore]"],
+    "Git Ignore": ["dockerignore"]
+  },
   "hard_tabs": false,
   "formatter": "auto",
   "remove_trailing_whitespace_on_save": true,