-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 7144b10
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: sync-code | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '*/30 0-16,22-23 * * *' | ||
jobs: | ||
sync: | ||
runs-on: ubuntu-18.04 | ||
if: github.repository == 'RikudouPatrickstar/jd_shell' | ||
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.EVINEKEY }}" > ~/.ssh/id_rsa | ||
chmod 600 ~/.ssh/id_rsa | ||
ssh-keyscan gitee.com > ~/.ssh/known_hosts | ||
- name: Clone Code | ||
run: | | ||
git clone -b master git@gitee.com:evine/jd_shell.git jd_shell | ||
- name: Push Code | ||
uses: ad-m/github-push-action@master | ||
with: | ||
directory: jd_shell | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
See you later |