rts-sim-testing-client/.gitea/workflows/CI_local_test.yaml

57 lines
2.0 KiB
YAML
Raw Normal View History

name: CI
run-name: ${{ gitea.actor }} is testing out Gitea Actions
on:
push:
branches:
- local-test
jobs:
Docker-Build:
runs-on: joylink-local233
steps:
- name: 检出代码
uses: https://gitea.joylink.club/actions/checkout@v4
with:
submodules: recursive
- name: 设置node环境
2024-03-20 21:57:05 +08:00
uses: https://gitea.joylink.club/actions/local-setup-node@v0.1.1
with:
2024-03-20 21:57:05 +08:00
version: 'v18.19.1'
2024-03-19 21:52:16 +08:00
cache: 'yarn'
cache-dependency-path: 'yarn.lock'
2024-04-02 18:49:35 +08:00
env: URL_ENV: 'local'
environment: URL_ENV: 'test'
- name: 安装yarn,并run build
run: |
node -v
npm -v
npm config set registry https://registry.npmmirror.com
npm install --global yarn
yarn config set registry https://registry.npmmirror.com
yarn
yarn run build:test
tar czvf ./dist-test.tar.gz ./dist
2024-03-20 21:57:05 +08:00
- name: 打包发送到本地测试环境
uses: https://gitea.joylink.club/appleboy/scp-action@v0.1.7
with:
host: ${{ secrets.LOCAL_233_SSH_HOST }}
username: ${{ secrets.LOCAL_233_SSH_USER }}
password: ${{ secrets.LOCAL_233_SSH_PASSWORD }}
port: ${{ secrets.LOCAL_233_SSH_PORT }}
source: ./dist-test.tar.gz
target: /home/minio/oss/rts-sim-testing-client
2024-03-20 22:37:06 +08:00
overwrite: true
2024-03-20 21:57:05 +08:00
- name: SSH连接233并解压发布
uses: https://gitea.joylink.club/appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.LOCAL_233_SSH_HOST }}
port: ${{ secrets.LOCAL_233_SSH_PORT }}
username: ${{ secrets.LOCAL_233_SSH_USER }}
password: ${{ secrets.LOCAL_233_SSH_PASSWORD }}
script: |
cd /home/minio/oss/rts-sim-testing-client
rm -rf /usr/local/joylink/client/bjrtss
2024-03-20 22:50:39 +08:00
mkdir -p /usr/local/joylink/client
tar xz --strip 2 -C /usr/local/joylink/client -f dist-test.tar.gz
- run: echo "This job's status is ${{ job.status }}."