Spaces:
Running
Running
Create .github/workflows/restart.yml
Browse files
.github/workflows/restart.yml
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Scheduled Restart
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
schedule:
|
| 5 |
+
- cron: '0 */1 * * *' # every 6 hours
|
| 6 |
+
workflow_dispatch:
|
| 7 |
+
|
| 8 |
+
jobs:
|
| 9 |
+
restart:
|
| 10 |
+
runs-on: ubuntu-latest
|
| 11 |
+
steps:
|
| 12 |
+
- uses: actions/checkout@v4
|
| 13 |
+
- run: |
|
| 14 |
+
date > restart.txt
|
| 15 |
+
git config user.name "github-actions"
|
| 16 |
+
git config user.email "[email protected]"
|
| 17 |
+
git add restart.txt
|
| 18 |
+
git commit -m "Scheduled restart"
|
| 19 |
+
git push
|