Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>pull/561/head
parent
23012d6520
commit
23f7b62a53
@ -0,0 +1,45 @@
|
|||||||
|
name: deploy for dev
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'devops' # Only for the dev branch
|
||||||
|
paths:
|
||||||
|
- '.github/workflows/*'
|
||||||
|
# - '__test__/**' # dev No immediate testing is required
|
||||||
|
- 'src/**'
|
||||||
|
- 'Dockerfile'
|
||||||
|
- 'docker-compose.yml'
|
||||||
|
- 'bin/*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy-dev:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: set ssh key # Temporarily set up ssh key
|
||||||
|
run: |
|
||||||
|
mkdir -p ~/.ssh/
|
||||||
|
# secrets.WFP_ID_RSA set in GitHub
|
||||||
|
echo "${{secrets.WFP_ID_RSA}}" > ~/.ssh/id_rsa
|
||||||
|
chmod 600 ~/.ssh/id_rsa
|
||||||
|
ssh-keyscan "182.92.xxx.xxx" >> ~/.ssh/known_hosts
|
||||||
|
- name: deploy # Deployment
|
||||||
|
run: |
|
||||||
|
ssh work@182.92.xxx.xxx "
|
||||||
|
# 【Attention】Log in with the 'work' account, manually create /home/work/imooc-lego directory
|
||||||
|
# Then git clone https://username:password@github.com/imooc-lego/biz-editor-server.git -b dev (private repository, use GitHub username and password)
|
||||||
|
# Remember to delete origin to avoid exposing GitHub password
|
||||||
|
|
||||||
|
cd /home/work/imooc-lego/biz-editor-server;
|
||||||
|
git remote add origin https://openimbot:${{secrets.WFP_PASSWORD}}@github.com/OpenIMSDK/open-im-server.git;
|
||||||
|
git checkout dev;
|
||||||
|
git pull origin dev; # Download the latest code again
|
||||||
|
git remote remove origin; # Remove origin to avoid exposing GitHub password
|
||||||
|
# Start docker
|
||||||
|
docker-compose build editor-server; # Same as the service name in docker-compose.yml
|
||||||
|
docker-compose up -d;
|
||||||
|
"
|
||||||
|
- name: delete ssh key # Delete ssh key
|
||||||
|
run: rm -rf ~/.ssh/id_rsa
|
@ -1,24 +0,0 @@
|
|||||||
name: OpenIM Grype
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: ['main']
|
|
||||||
tags: ['v*']
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
scan-source:
|
|
||||||
name: scan-source
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
security-events: write
|
|
||||||
actions: read
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
|
|
||||||
- uses: anchore/scan-action@v3
|
|
||||||
with:
|
|
||||||
path: "."
|
|
||||||
fail-build: true
|
|
@ -0,0 +1,51 @@
|
|||||||
|
name: 'Lock Threads'
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 * * * *'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
issues: write
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: lock
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
action:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: dessant/lock-threads@v4
|
||||||
|
with:
|
||||||
|
github-token: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||||
|
issue-inactive-days: '365'
|
||||||
|
exclude-issue-created-before: ''
|
||||||
|
exclude-issue-created-after: ''
|
||||||
|
exclude-issue-created-between: ''
|
||||||
|
exclude-issue-closed-before: ''
|
||||||
|
exclude-issue-closed-after: ''
|
||||||
|
exclude-issue-closed-between: ''
|
||||||
|
include-any-issue-labels: ''
|
||||||
|
include-all-issue-labels: ''
|
||||||
|
exclude-any-issue-labels: ''
|
||||||
|
add-issue-labels: ''
|
||||||
|
remove-issue-labels: ''
|
||||||
|
issue-comment: ''
|
||||||
|
issue-lock-reason: 'resolved'
|
||||||
|
pr-inactive-days: '365'
|
||||||
|
exclude-pr-created-before: ''
|
||||||
|
exclude-pr-created-after: ''
|
||||||
|
exclude-pr-created-between: ''
|
||||||
|
exclude-pr-closed-before: ''
|
||||||
|
exclude-pr-closed-after: ''
|
||||||
|
exclude-pr-closed-between: ''
|
||||||
|
include-any-pr-labels: ''
|
||||||
|
include-all-pr-labels: ''
|
||||||
|
exclude-any-pr-labels: ''
|
||||||
|
add-pr-labels: ''
|
||||||
|
remove-pr-labels: ''
|
||||||
|
pr-comment: ''
|
||||||
|
pr-lock-reason: 'resolved'
|
||||||
|
process-only: ''
|
||||||
|
log-output: false
|
Loading…
Reference in new issue