Skip to content

fix: fix the flag parse (#260) #280

fix: fix the flag parse (#260)

fix: fix the flag parse (#260) #280

Workflow file for this run

# 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 30
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 sleep 15; ports=(10008 10009 30200 30300); for port in "${ports[@]}"; do if ! lsof -i :$port > /dev/null; then echo "The service is not started on port $port."; exit 1; else echo "The service is started normally on port $port."; fi; done; echo "All port services have been started normally."
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