-
Notifications
You must be signed in to change notification settings - Fork 20
46 lines (39 loc) · 1.26 KB
/
sync-jd_scripts.yml
File metadata and controls
46 lines (39 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: sync-jd_scripts
on:
workflow_dispatch:
schedule:
- cron: '*/15 0-16,22-23 * * *'
jobs:
build:
runs-on: ubuntu-18.04
if: github.repository == 'RikudouPatrickstar/jd_scripts'
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 && apt-get install -y build-essential git git-core curl wget && apt-get clean -y
git config --global user.name 'GitHub Actions' && git config --global user.email 'noreply@github.com'
- name: Prepare
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