mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-09 00:50:04 +03:00
6c45be2dc4
This will hopefully keep the system drive cleaned up so we don't run issues with not enough disk space.
50 lines
1.3 KiB
YAML
50 lines
1.3 KiB
YAML
name: Publish Collab Server Image
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- collab-v*
|
|
|
|
env:
|
|
DOCKER_BUILDKIT: 1
|
|
DIGITALOCEAN_ACCESS_TOKEN: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
|
|
|
|
jobs:
|
|
publish:
|
|
name: Publish collab server image
|
|
runs-on:
|
|
- self-hosted
|
|
- deploy
|
|
steps:
|
|
- name: Add Rust to the PATH
|
|
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
|
|
|
- name: Sign into DigitalOcean docker registry
|
|
run: doctl registry login
|
|
|
|
- name: Prune Docker system
|
|
run: docker system prune
|
|
|
|
- name: Checkout repo
|
|
uses: actions/checkout@v3
|
|
with:
|
|
clean: false
|
|
submodules: 'recursive'
|
|
|
|
- name: Determine version
|
|
run: |
|
|
set -eu
|
|
version=$(script/get-crate-version collab)
|
|
if [[ $GITHUB_REF_NAME != "collab-v${version}" ]]; then
|
|
echo "release tag ${GITHUB_REF_NAME} does not match version ${version}"
|
|
exit 1
|
|
fi
|
|
echo "Publishing collab version: ${version}"
|
|
echo "COLLAB_VERSION=${version}" >> $GITHUB_ENV
|
|
|
|
- name: Build docker image
|
|
run: docker build . --tag registry.digitalocean.com/zed/collab:v${COLLAB_VERSION}
|
|
|
|
- name: Publish docker image
|
|
run: docker push registry.digitalocean.com/zed/collab:v${COLLAB_VERSION}
|