From 0c99996676b84fd57a8ecfc3005744bd3ddb8f5e Mon Sep 17 00:00:00 2001 From: RikudouPatrickstar <68163551+RikudouPatrickstar@users.noreply.github.com> Date: Mon, 8 Mar 2021 22:37:00 +0800 Subject: [PATCH] Sync --- .github/workflows/sync-jd_scripts.yml | 42 +++++++++++++++++++++++++++ README.md | 1 + 2 files changed, 43 insertions(+) create mode 100644 .github/workflows/sync-jd_scripts.yml create mode 100644 README.md diff --git a/.github/workflows/sync-jd_scripts.yml b/.github/workflows/sync-jd_scripts.yml new file mode 100644 index 0000000..2dc589c --- /dev/null +++ b/.github/workflows/sync-jd_scripts.yml @@ -0,0 +1,42 @@ +name: sync-jd_scripts +on: + workflow_dispatch: + schedule: + - cron: '*/15 0-16,22-23 * * *' +jobs: + sync: + runs-on: ubuntu-18.04 + if: github.repository == 'RikudouPatrickstar/jd_scripts' + timeout-minutes: 2 + steps: + - name: Init Build Dependencies + env: + DEBIAN_FRONTEND: noninteractive + run: | + sudo -E rm -rf /etc/apt/sources.list.d + sudo -E apt-get update -y + sudo -E apt-get install -y build-essential git git-core curl wget + sudo -E apt-get clean -y + git config --global user.name 'GitHub Actions' && git config --global user.email 'noreply@github.com' + - name: Prepare Key + run: | + mkdir -p ~/.ssh + echo -e "${{ secrets.LXKEY }}" > ~/.ssh/id_rsa + chmod 600 ~/.ssh/id_rsa + ssh-keyscan gitee.com > ~/.ssh/known_hosts + - name: Clone Master + run: | + git clone -b master git@gitee.com:lxk0301/jd_scripts.git master + - name: Push Master + uses: ad-m/github-push-action@master + with: + directory: master + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: master + - name: Delete Workflow Runs + uses: Mattraks/delete-workflow-runs@main + with: + token: ${{ github.token }} + repository: ${{ github.repository }} + retain_days: 1 + keep_minimum_runs: 0 diff --git a/README.md b/README.md new file mode 100644 index 0000000..a1f92f5 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +See you later \ No newline at end of file