mirror of
https://github.com/monlor/MIXBOX-ARCHIVE.git
synced 2026-03-10 23:41:27 +00:00
2020-03-05 18:31:48
This commit is contained in:
47
.github/workflows/main.yml
vendored
47
.github/workflows/main.yml
vendored
@@ -1,41 +1,11 @@
|
||||
name: CI
|
||||
|
||||
# on:
|
||||
# push:
|
||||
# branchs:
|
||||
# - 'test'
|
||||
# - 'master'
|
||||
# pull_request:
|
||||
# branchs:
|
||||
# - 'test'
|
||||
# - 'master'
|
||||
# paths:
|
||||
# - 'apps/**'
|
||||
# - 'appsbin/**'
|
||||
# - 'temp/**'
|
||||
# on: [push, pull_request]
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- 'README.md'
|
||||
- 'tools'
|
||||
- '.github'
|
||||
branchs:
|
||||
- 'test'
|
||||
- 'master'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- 'README.md'
|
||||
- 'tools'
|
||||
- '.github'
|
||||
branchs:
|
||||
- 'test'
|
||||
- 'master'
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
|
||||
runs-on: macos-latest
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
@@ -53,10 +23,8 @@ jobs:
|
||||
cp -rf install.sh mbfiles/
|
||||
- name: Push changes
|
||||
env:
|
||||
GH_REF: github.com/monlor/mbfiles
|
||||
GE_REF: gitee.com/monlor/mbfiles
|
||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
GE_TOKEN: ${{ secrets.GE_TOKEN }}
|
||||
GH_REF: ${{ secrets.GH_REF }}
|
||||
CO_REF: ${{ secrets.CO_REF }}
|
||||
BRANCH_NAME: $(cd .. && git branch | awk '$1 == "*"{print $2}')
|
||||
run: |
|
||||
cd mbfiles/
|
||||
@@ -65,8 +33,5 @@ jobs:
|
||||
git config --local user.name "monlor"
|
||||
git add .
|
||||
git commit -m "$(TZ='Asia/Shanghai' date "+%Y-%m-%d %H:%M:%S")" -a
|
||||
eval "git branch | grep -q "${BRANCH_NAME}" || git checkout -b "${BRANCH_NAME}""
|
||||
eval "git push "https://${GH_TOKEN}@${GH_REF}" "${BRANCH_NAME}":"${BRANCH_NAME}" -f"
|
||||
echo "${GE_TOKEN}" > /root/.ssh/id_rsa
|
||||
chmod 600 /root/.ssh/id_rsa
|
||||
eval "git push "https://${GE_REF}" "${BRANCH_NAME}":"${BRANCH_NAME}" -f"
|
||||
eval "git push "${GH_REF}" master:"${BRANCH_NAME}" -f"
|
||||
eval "git push "${CO_REF}" master:"${BRANCH_NAME}" -f"
|
||||
55
.github/workflows/master.yml
vendored
Normal file
55
.github/workflows/master.yml
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
name: Master-CI
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- 'README.md'
|
||||
branches:
|
||||
- 'master1'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- 'README.md'
|
||||
branches:
|
||||
- 'master1'
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@master
|
||||
|
||||
- name: Pack files
|
||||
run: |
|
||||
mkdir appstore/
|
||||
mkdir mbfiles/
|
||||
bash ./tools/gitsync.sh pack all
|
||||
cp -rf appsbin/ mbfiles/appsbin/
|
||||
cp -rf appstore/ mbfiles/appstore/
|
||||
cp -rf temp/ mbfiles/temp/
|
||||
cp -rf applist.txt mbfiles/
|
||||
cp -rf install.sh mbfiles/
|
||||
|
||||
- name: Push to Github
|
||||
env:
|
||||
GH_REF: github.com/monlor/mbfiles
|
||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
run: |
|
||||
cd mbfiles/
|
||||
git init
|
||||
git config --local user.email "monlor@qq.com"
|
||||
git config --local user.name "monlor"
|
||||
git add .
|
||||
git commit -m "$(TZ='Asia/Shanghai' date "+%Y-%m-%d %H:%M:%S")" -a
|
||||
git push "https://${GH_TOKEN}@${GH_REF}" master:master -f
|
||||
|
||||
- name: Push to Gitee
|
||||
uses: s0/git-publish-subdir-action@master
|
||||
env:
|
||||
REPO: git@gitee.com:monlor/mbfiles.git
|
||||
BRANCH: master
|
||||
FOLDER: mbfiles
|
||||
SSH_PRIVATE_KEY: ${{ secrets.GE_TOKEN }}
|
||||
KNOWN_HOSTS_FILE: temp/known_hosts # Needed if target repo is not on github.com
|
||||
|
||||
|
||||
55
.github/workflows/test.yaml
vendored
Normal file
55
.github/workflows/test.yaml
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
name: Test-CI
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- 'README.md'
|
||||
branches:
|
||||
- 'test1'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- 'README.md'
|
||||
branches:
|
||||
- 'test1'
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@master
|
||||
|
||||
- name: Pack files
|
||||
run: |
|
||||
mkdir appstore/
|
||||
mkdir mbfiles/
|
||||
bash ./tools/gitsync.sh pack all
|
||||
cp -rf appsbin/ mbfiles/appsbin/
|
||||
cp -rf appstore/ mbfiles/appstore/
|
||||
cp -rf temp/ mbfiles/temp/
|
||||
cp -rf applist.txt mbfiles/
|
||||
cp -rf install.sh mbfiles/
|
||||
|
||||
- name: Push to Github
|
||||
env:
|
||||
GH_REF: github.com/monlor/mbfiles
|
||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
run: |
|
||||
cd mbfiles/
|
||||
git init
|
||||
git config --local user.email "monlor@qq.com"
|
||||
git config --local user.name "monlor"
|
||||
git add .
|
||||
git commit -m "$(TZ='Asia/Shanghai' date "+%Y-%m-%d %H:%M:%S")" -a
|
||||
git push "https://${GH_TOKEN}@${GH_REF}" master:test -f
|
||||
|
||||
- name: Push to Gitee
|
||||
uses: s0/git-publish-subdir-action@master
|
||||
env:
|
||||
REPO: git@gitee.com:monlor/mbfiles.git
|
||||
BRANCH: test
|
||||
FOLDER: mbfiles
|
||||
SSH_PRIVATE_KEY: ${{ secrets.GE_TOKEN }}
|
||||
KNOWN_HOSTS_FILE: temp/known_hosts # Needed if target repo is not on github.com
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
export PATH=$PATH:/etc/mixbox/bin
|
||||
|
||||
mburl_coding="https://monlor.coding.net/p/mbfiles/d/mbfiles/git/raw/master"
|
||||
mburl_github="https://cdn.jsdelivr.net/gh/monlor/mbfiles"
|
||||
mburl_github="https://raw.githubusercontent.com/monlor/MIXBOX/master"
|
||||
# mburl_test="https://monlor.coding.net/p/mbfiles/d/mbfiles/git/raw/test"
|
||||
mburl=$(mbdb get mixbox.main.url) || mburl="$mburl_coding"
|
||||
mbroot=$(mbdb get mixbox.main.path)
|
||||
|
||||
6
temp/known_hosts
Normal file
6
temp/known_hosts
Normal file
@@ -0,0 +1,6 @@
|
||||
# gitee.com:22 SSH-2.0-Basalt-3.0.0
|
||||
gitee.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBMuEoYdx6to5oxR60IWj8uoe1aI0X1fKOHWOtLqTg1tsLT1iFwXV5JmFjU46EzeMBV/6EmI1uaRI6HiEPtPtJHE=
|
||||
# gitee.com:22 SSH-2.0-Basalt-1.2.12
|
||||
gitee.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDMzG3r+88lWSDK9fyjcZmYsWGDBDmGoAasKMAmjoFloGt9HRQX2Qp4f9FY2XK/hsHYinvoh5Xytl9iaUNUWMfYR8q6VEMtOO87DgoAFcfKZHt0/nbAg9RoNTKYt6v8tPwYpr7N0JP/01nE4LFsNDnstr6H0bXSAzbKWCETLZfdPV4l2uSpRn3bU0ugoZ0aSKz5Dc/IloBfGCTvkSsxUydMRd/Chpjt6VxncDbp+Fa6pzsseK8OQzrg6Fgc5783EN3EQqZ2skqyCwExtx95BJlfx1B3luZnWfpkwNDnrZRT/Qx0OrWqyf0q6f9uQr+UG1S8qDcUn3e/9onq3rwBri8/
|
||||
# gitee.com:22 SSH-2.0-Basalt-3.0.0
|
||||
gitee.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEKxHSJ7084RmkJ4YdEi5tngynE8aZe2uEoVVsB/OvYN
|
||||
Reference in New Issue
Block a user