Skip to content

测试定时任务

测试定时任务 #2

name: Update Game Data, Recompile wasm, and push to forward

Check failure on line 1 in .github/workflows/UpdateEmscriptenForward.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/UpdateEmscriptenForward.yml

Invalid workflow file

invalid `cron` attribute "7 40 * * *"
on:
schedule:
- cron: '7 40 * * *'
jobs:
update:
continue-on-error: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Update Game Data
run: python data/checkUpdate.py
- name: Commit files
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add data -f
git commit -m "Update Game Data"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
recompile-ems:
runs-on: ubuntu-latest
needs: update
steps:
- uses: mymindstorm/setup-emsdk@v13
with:
version: 3.1.47
- name: version
run: emcc --version
- uses: actions/checkout@v2
- run: git pull
- run: sed -zi 's/\n//g' data/data.min.json
- run: sed -zi 's/ //g' data/data.min.json
- name: Recompile
run: |
cd build_js
emcmake cmake .. -DCMAKE_BUILD_TYPE=Release
emmake make
- name: Commit files
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add build_js
git commit -m "Recompile Emscripten"
- name: Remove CmakeFiles
run: |
rm -rf build_js/CMakeFiles
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
- name: Deploy to external repository
uses: cpina/github-action-push-to-another-repository@main
env:
API_TOKEN_GITHUB: ${{ secrets.bcjh_web }}
with:
# GitHub Action output files
source-directory: build_js/
destination-github-username: haoyun0
destination-repository-name: BCJH-Metropolis-html
user-email: 41898282+github-actions[bot]@users.noreply.github.com
# It defaults to `main`
target-branch: "forward-emscripten"
target-directory: "js/upload"
commit-message: ${{ github.event.head_commit.message }}. (From $ORIGIN_REPOSITORY_URL@commit)
push-to-debug:
runs-on: ubuntu-latest
# Makes sure that when the debug page is ready, the main page is also ready
if: ${{ !cancelled() }}
steps:
- uses: mymindstorm/setup-emsdk@v13
with:
version: 3.1.56
- name: version
run: emcc --version
- uses: actions/checkout@v2
- run: git pull
- run: sed -zi 's/\n//g' data/data.min.json
- run: sed -zi 's/ //g' data/data.min.json
- name: Recompile
run: |
cd build_js
emcmake cmake .. -DCMAKE_BUILD_TYPE=Debug
emmake make
- name: Remove CmakeFiles
run: |
rm -rf build_js/CMakeFiles
- name: Deploy to external repository
uses: cpina/github-action-push-to-another-repository@main
env:
API_TOKEN_GITHUB: ${{ secrets.bcjh_web }}
with:
# GitHub Action output files
source-directory: build_js/
destination-github-username: haoyun0
destination-repository-name: BCJH-Metropolis-html
user-email: 41898282+github-actions[bot]@users.noreply.github.com
# It defaults to `main`
target-branch: "debug-online"
target-directory: "js/upload"
commit-message: ${{ github.event.head_commit.message }}. (From $ORIGIN_REPOSITORY_URL@commit)