diff --git a/.github/workflows/publish_foss_docker.yml b/.github/workflows/publish_foss_docker.yml index f56d67f99..37f0f3e6e 100644 --- a/.github/workflows/publish_foss_docker.yml +++ b/.github/workflows/publish_foss_docker.yml @@ -1,7 +1,7 @@ # # # # This action will publish Chatwoot CE docker image. # # This is set to run against merges to develop, master -# # when tags are created. +# # and when tags are created. # # name: Publish Chatwoot CE docker images @@ -20,8 +20,10 @@ jobs: env: GIT_REF: ${{ github.head_ref || github.ref_name }} # ref_name to get tags/branches steps: - - - name: Set up QEMU + - name: Checkout + uses: actions/checkout@v2 + + - name: Set up QEMU uses: docker/setup-qemu-action@v1 - name: Set up Docker Buildx @@ -32,6 +34,10 @@ jobs: rm -rf enterprise rm -rf spec/enterprise + - name: Set Chatwoot edition + run: | + echo -en '\nENV CW_EDITION="ce"' >> docker/Dockerfile + - name: set docker tag run: | echo "DOCKER_TAG=chatwoot/chatwoot:$GIT_REF-ce" >> $GITHUB_ENV @@ -50,6 +56,7 @@ jobs: - name: Build and push uses: docker/build-push-action@v2 with: + context: . file: docker/Dockerfile push: true tags: ${{ env.DOCKER_TAG }} diff --git a/lib/chatwoot_hub.rb b/lib/chatwoot_hub.rb index 655060c7e..86f296f79 100644 --- a/lib/chatwoot_hub.rb +++ b/lib/chatwoot_hub.rb @@ -16,7 +16,8 @@ class ChatwootHub installation_identifier: installation_identifier, installation_version: Chatwoot.config[:version], installation_host: URI.parse(ENV.fetch('FRONTEND_URL', '')).host, - installation_env: ENV.fetch('INSTALLATION_ENV', '') + installation_env: ENV.fetch('INSTALLATION_ENV', ''), + edition: ENV.fetch('CW_EDITION', '') } end