commit de8f2bd3ddb9be499f66a1dd9e6f1de241f7c65d
parent 71cc4af874bc9d76e5cafd995495a1896be7721d
Author: MTRNord <mtrnord1@gmail.com>
Date: Tue, 13 Jun 2023 20:01:05 +0200
Add chatwoot build
Diffstat:
6 files changed, 146 insertions(+), 0 deletions(-)
diff --git a/.github/workflows/build_chatwoot.yaml b/.github/workflows/build_chatwoot.yaml
@@ -0,0 +1,69 @@
+name: Publish Chatwoot Docker image
+
+on:
+ push:
+ branches:
+ - "main"
+ workflow_dispatch:
+
+jobs:
+ push_to_registries:
+ permissions:
+ contents: read
+ packages: write
+ id-token: write
+ name: Push chatwoot image to repo
+ runs-on: ubuntu-latest
+ steps:
+ - name: Check out the repo
+ uses: actions/checkout@v3
+ with:
+ submodules: "recursive"
+
+ - name: Log in to Docker Hub
+ uses: docker/login-action@v2
+ with:
+ registry: coreharbor.kubernetes.midnightthoughts.space
+ username: ${{ secrets.DOCKER_USERNAME }}
+ password: ${{ secrets.DOCKER_PASSWORD }}
+
+ - name: Install Cosign
+ uses: sigstore/cosign-installer@v3
+ - name: Set up QEMU
+ uses: docker/setup-qemu-action@v2
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v2
+
+ - name: Docker meta
+ id: docker_meta
+ uses: docker/metadata-action@v4
+ with:
+ images: coreharbor.kubernetes.midnightthoughts.space/chatwoot/chatwoot
+ tags: type=sha,format=long
+
+ - name: Strip enterprise code
+ run: |
+ rm -rf chatwoot/enterprise
+ rm -rf chatwoot/spec/enterprise
+
+ - name: Set Chatwoot edition
+ run: |
+ echo -en '\nENV CW_EDITION="ce"' >> chatwoot/docker/Dockerfile
+
+ - name: Build and push
+ id: build_and_push
+ uses: docker/build-push-action@v4
+ with:
+ push: true
+ context: chatwoot
+ file: chatwoot/docker/Dockerfile
+ sbom: true
+ provenance: true
+ platforms: linux/amd64,linux/arm64
+ tags: ${{ steps.docker_meta.outputs.tags }}
+
+ - name: Sign the images with GitHub OIDC Token
+ env:
+ DIGEST: ${{ steps.build_and_push.outputs.digest }}
+ TAGS: ${{ steps.docker_meta.outputs.tags }}
+ run: cosign sign --yes "${TAGS}@${DIGEST}"
diff --git a/.github/workflows/build_chatwoot_release.yaml b/.github/workflows/build_chatwoot_release.yaml
@@ -0,0 +1,69 @@
+name: Publish Synapse Docker image on release
+
+on:
+ push:
+ tags:
+ - synapse-**
+ workflow_dispatch:
+
+jobs:
+ push_to_registries:
+ permissions:
+ contents: read
+ packages: write
+ id-token: write
+ name: Push synapse image to repo
+ runs-on: ubuntu-latest
+ steps:
+ - name: Check out the repo
+ uses: actions/checkout@v3
+ with:
+ submodules: "recursive"
+
+ - name: Log in to Docker Hub
+ uses: docker/login-action@v2
+ with:
+ registry: coreharbor.kubernetes.midnightthoughts.space
+ username: ${{ secrets.DOCKER_USERNAME }}
+ password: ${{ secrets.DOCKER_PASSWORD }}
+
+ - name: Install Cosign
+ uses: sigstore/cosign-installer@v3
+ - name: Set up QEMU
+ uses: docker/setup-qemu-action@v2
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v2
+
+ - name: Docker meta
+ id: docker_meta
+ uses: docker/metadata-action@v4
+ with:
+ images: coreharbor.kubernetes.midnightthoughts.space/chatwoot/chatwoot
+ tags: type=sha,format=long
+
+ - name: Strip enterprise code
+ run: |
+ rm -rf chatwoot/enterprise
+ rm -rf chatwoot/spec/enterprise
+
+ - name: Set Chatwoot edition
+ run: |
+ echo -en '\nENV CW_EDITION="ce"' >> chatwoot/docker/Dockerfile
+
+ - name: Build and push
+ id: build_and_push
+ uses: docker/build-push-action@v4
+ with:
+ push: true
+ context: chatwoot
+ file: chatwoot/docker/Dockerfile
+ sbom: true
+ provenance: true
+ platforms: linux/amd64,linux/arm64
+ tags: ${{ steps.docker_meta.outputs.tags }}
+
+ - name: Sign the images with GitHub OIDC Token
+ env:
+ DIGEST: ${{ steps.build_and_push.outputs.digest }}
+ TAGS: ${{ steps.docker_meta.outputs.tags }}
+ run: cosign sign --yes "${TAGS}@${DIGEST}"
diff --git a/.github/workflows/build_synapse.yaml b/.github/workflows/build_synapse.yaml
@@ -17,6 +17,8 @@ jobs:
steps:
- name: Check out the repo
uses: actions/checkout@v3
+ with:
+ submodules: "recursive"
- name: Log in to Docker Hub
uses: docker/login-action@v2
diff --git a/.github/workflows/build_synapse_release.yaml b/.github/workflows/build_synapse_release.yaml
@@ -17,6 +17,8 @@ jobs:
steps:
- name: Check out the repo
uses: actions/checkout@v3
+ with:
+ submodules: "recursive"
- name: Log in to Docker Hub
uses: docker/login-action@v2
diff --git a/.gitmodules b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "chatwoot"]
+ path = chatwoot
+ url = git@github.com:chatwoot/chatwoot.git
diff --git a/chatwoot b/chatwoot
@@ -0,0 +1 @@
+Subproject commit 08fa370261d43c237679e2875fa797b289c83a40