Skip to content

Open-source and local-first Slack and Notion alternative that puts you in control of your data

Added GitHub Actions workflow for building and pushing Docker image

ylber-gashib64ab9134d12
diff --git a/.github/workflows/publish-image.yml b/.github/workflows/publish-image.yml
new file mode 100644
index 00000000..c1b97008
--- /dev/null
+++ b/.github/workflows/publish-image.yml
@@ -0,0 +1,45 @@
+name: Build and Push Docker Image
+
+on:
+ push:
+ tags:
+ - 'v*'
+
+env:
+ REGISTRY: ghcr.io
+ SERVER_IMAGE_NAME: neuronapp/neuron/server
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v3
+
+ - name: Log in to GitHub Container Registry
+ uses: docker/login-action@v3
+ with:
+ registry: ${{ env.REGISTRY }}
+ username: ${{ github.actor }}
+ password: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Extract metadata (tags, labels) for Docker
+ id: meta
+ uses: docker/metadata-action@v5
+ with:
+ images: |
+ ${{ env.REGISTRY }}/${{ env.SERVER_IMAGE_NAME }}
+
+ - name: Build and push Neuron server image
+ uses: docker/build-push-action@v5
+ with:
+ context: ./server
+ file: ./server/Dockerfile
+ push: true
+ tags: |
+ ${{ env.REGISTRY }}/${{ env.SERVER_IMAGE_NAME }}:latest
+ ${{ env.REGISTRY }}/${{ env.SERVER_IMAGE_NAME }}:${{ steps.meta.outputs.version }}
+ labels: ${{ steps.meta.outputs.labels }}
\ No newline at end of file