File tree 2 files changed +37
-41
lines changed
2 files changed +37
-41
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ name : Daily Commit and Solution Update
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ schedule :
8
+ - cron : ' 0 22 * * *' # Runs once a day at 10 PM UTC
9
+ workflow_dispatch :
10
+
11
+ jobs :
12
+ update-solution :
13
+ runs-on : ubuntu-latest
14
+
15
+ steps :
16
+ - name : Checkout Repository
17
+ uses : actions/checkout@v4
18
+
19
+ - name : Setup Python
20
+ uses : actions/setup-python@v5
21
+ with :
22
+ python-version : 3.8
23
+
24
+ - name : Install Dependencies
25
+ run : pip install requests
26
+
27
+ - name : Get Latest Commit and Update Solution
28
+ run : python src/update_solution.py ${{ github.repository_owner }} ${{ secrets.GITHUB_TOKEN }} README.md
29
+
30
+ - name : Commit and Push Changes
31
+ run : |
32
+ git config --local user.email "github-actions[bot]@users.noreply.github.com"
33
+ git config --local user.name "github-actions[bot]"
34
+ git add -A
35
+ git diff-index --quiet HEAD || git commit -m "Update today's solution"
36
+ git push
37
+
You can’t perform that action at this time.
0 commit comments