|
|
@@ -0,0 +1,48 @@
|
|
|
+name: Monkey (Linux)
|
|
|
+
|
|
|
+on:
|
|
|
+ schedule: # execute every 1 hours
|
|
|
+ - cron: "0 */1 * * *"
|
|
|
+
|
|
|
+jobs:
|
|
|
+ build:
|
|
|
+ strategy:
|
|
|
+ matrix:
|
|
|
+ os: [ubuntu-latest]
|
|
|
+
|
|
|
+ runs-on: ${{ matrix.os }}
|
|
|
+
|
|
|
+ steps:
|
|
|
+ - uses: actions/checkout@v1
|
|
|
+ - uses: xmake-io/github-action-setup-xmake@v1
|
|
|
+ with:
|
|
|
+ xmake-version: branch@master
|
|
|
+
|
|
|
+ - name: Installation
|
|
|
+ run: |
|
|
|
+ curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
|
|
|
+ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
|
|
|
+ sudo apt update
|
|
|
+ sudo apt install -y gh unzip zip
|
|
|
+ echo ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token
|
|
|
+ git config --global user.email "[email protected]"
|
|
|
+ git config --global user.name "ruki"
|
|
|
+
|
|
|
+ - name: Install SSH key
|
|
|
+ uses: shimataro/ssh-key-action@v2
|
|
|
+ with:
|
|
|
+ key: ${{ secrets.SSH_KEY }}
|
|
|
+ name: id_rsa # optional
|
|
|
+ known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
|
|
+
|
|
|
+ - name: Install SSH key (OSC)
|
|
|
+ uses: shimataro/ssh-key-action@v2
|
|
|
+ with:
|
|
|
+ key: ${{ secrets.SSH_KEY_OSC }}
|
|
|
+ name: id_ed25519 # optional
|
|
|
+ known_hosts: ${{ secrets.KNOWN_HOSTS }}
|
|
|
+
|
|
|
+ - name: Update
|
|
|
+ run: |
|
|
|
+ export GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
|
|
|
+ xmake l -vD ./scripts/sync.lua
|