forked from TonyJiangWJ/mimotion
-
Notifications
You must be signed in to change notification settings - Fork 2
28 lines (27 loc) · 964 Bytes
/
cron.yml
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
name: Random Cron
on:
workflow_run:
workflows: ["刷步数"]
types:
- completed
workflow_dispatch:
jobs:
repo-sync:
runs-on: ubuntu-latest
timeout-minutes: 3
if: github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch'
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.PAT }} #此处PAT需要申请,教程详见:README
- name: random cron
run: |
source cron_convert.sh
echo "configed CRON_HOURS ${{ vars.CRON_HOURS }}"
persist_execute_log ${{ github.event_name }} ${{ vars.CRON_HOURS }}
git config user.name github-actions
git config user.email [email protected]
git add .
current=`TZ=Asia/Shanghai date '+%Y-%m-%d %H:%M:%S'`
git commit -m "[${current}] random cron trigger by ${{ github.event_name }}"
git push origin master