feat: super openim chat k8s deployment and code remould #262
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright © 2023 OpenIM. All rights reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
name: OpenIM Chat Start Execute Scripts | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- "docs/**" | |
- "README.md" | |
- "README_zh-CN.md" | |
- "CONTRIBUTING.md" | |
pull_request: | |
branches: | |
- main | |
paths-ignore: | |
- "README.md" | |
- "README_zh-CN.md" | |
- "CONTRIBUTING.md" | |
- "docs/**" | |
jobs: | |
execute-scripts: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Build Chat | |
run: | | |
sudo make build | |
sudo chmod +x ./scripts/build_all_service.sh | |
sudo ./scripts/build_all_service.sh | |
shell: bash | |
- name: deploy all services | |
run: | | |
git clone -b release-v3.3 https://github.com/OpenIMSDK/Open-IM-Server.git openim && export openim=$(pwd)/openim && cd $openim | |
curl -o docker-compose.yaml https://gist.githubusercontent.com/cubxxw/b1d5cbd2edfa23fee911118aa3e8249e/raw/openim-chat.sh | |
sudo docker compose up -d | |
sudo sleep 60 | |
sudo chmod +x ./scripts/stop_all.sh | |
sudo ./scripts/stop_all.sh | |
sudo cat logs/openIM.log 2>/dev/null | |
sudo chmod +x ./scripts/build_all_service.sh | |
sudo ./scripts/build_all_service.sh | |
sudo cat logs/openIM.log 2>/dev/null | |
sudo chmod +x ./scripts/start_all.sh | |
sudo ./scripts/start_all.sh | |
sudo cat logs/openIM.log 2>/dev/null | |
sudo chmod +x ./scripts/check_all.sh | |
sudo ./scripts/check_all.sh | |
sudo cat logs/openIM.log 2>/dev/null | |
echo "pwd = $(pwd)" | |
cd .. | |
ls -al && pwd | |
shell: bash | |
continue-on-error: true | |
- name: start all services | |
run: | | |
sudo ./scripts/start_all.sh | |
shell: bash | |
- name: Check all services | |
run: | | |
sudo make check | |
shell: bash | |
- name: Print openIM.log | |
run: | | |
ls -al && echo "pwd = $(pwd)" | |
sudo cat ./logs/* 2>/dev/null | |
sudo cat ./logs/* 2>/dev/null >> "$GITHUB_OUTPUT" | |
shell: bash | |
continue-on-error: true |