moxbox init

This commit is contained in:
monlor
2020-03-05 00:08:40 +08:00
commit 76dbe98978
856 changed files with 170708 additions and 0 deletions

51
.github/workflows/main.yml vendored Normal file
View File

@@ -0,0 +1,51 @@
name: CI
# on:
# push:
# branchs:
# - 'test'
# - 'master'
# pull_request:
# branchs:
# - 'test'
# - 'master'
# paths:
# - 'apps/**'
# - 'appsbin/**'
# - 'temp/**'
on: [push, pull_request]
jobs:
publish:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Pack files
run: |
git lfs pull
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 changes
env:
GH_REF: ${{ secrets.GH_REF }}
CO_REF: ${{ secrets.CO_REF }}
BRANCH_NAME: $(cd .. && git branch | awk '$1 == "*"{print $2}')
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
eval "git branch | grep -q "${BRANCH_NAME}" || git checkout -b "${BRANCH_NAME}""
eval "git push "${GH_REF}" "${BRANCH_NAME}":"${BRANCH_NAME}" -f"
eval "git push "${CO_REF}" "${BRANCH_NAME}":"${BRANCH_NAME}" -f"