Commit b93d6ae 1 parent daf7b22 commit b93d6ae Copy full SHA for b93d6ae
File tree 3 files changed +42
-0
lines changed
3 files changed +42
-0
lines changed Original file line number Diff line number Diff line change
1
+ # 该脚本是为了避免脚本自动关闭(Github 公共仓库无代码活动60天自动关闭 Action)
2
+
3
+ name : Log Current Date For Active Action
4
+
5
+ on :
6
+ workflow_dispatch :
7
+ schedule :
8
+ - cron : ' 0 0 1 * *' # 每月1日时运行
9
+
10
+ jobs :
11
+ build :
12
+ runs-on : ubuntu-latest
13
+ steps :
14
+ - name : Checkout repo
15
+ uses : actions/checkout@v3
16
+
17
+ - name : Current date
18
+ run : |
19
+ bash day.sh
20
+
21
+ - name : Commit and push if changed
22
+ run : |-
23
+ git diff
24
+ git config --global user.email "[email protected] "
25
+ git config --global user.name "JS-banana"
26
+ git pull
27
+ git add -A
28
+ git commit -m "Updated current date" || exit 0
29
+ git push
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ name=" js-banana"
4
+ echo $name
5
+
6
+ echo " BACKUP DATE:" $( date +" %Y-%m-%d %H:%M:%S" )
7
+
8
+ DATE=` date ' +%Y%m%d-%H%M%S' `
9
+ echo $DATE
10
+
11
+ LogNameDATE=` date ' +%Y%m%d' `
12
+
13
+ echo " UPDATE DATE:" $( date +" %Y-%m-%d %H:%M:%S" ) >> day.txt
You can’t perform that action at this time.
0 commit comments