Commit a314230 1 parent 885e334 commit a314230 Copy full SHA for a314230
File tree 2 files changed +28
-72
lines changed
2 files changed +28
-72
lines changed Original file line number Diff line number Diff line change
1
+ name : Check Updates
2
+
3
+ on :
4
+ schedule :
5
+ - cron : " 0 0 * * *" # Runs every day at midnight UTC
6
+
7
+ jobs :
8
+ check_updates :
9
+ runs-on : ubuntu-latest
10
+
11
+ steps :
12
+ - name : Checkout repository
13
+ uses : actions/checkout@v2
14
+
15
+ - name : Fetch JSON data
16
+ run : |
17
+ curl -o optimalfraction.json https://charts-core.peercoinexplorer.net/optimalfraction.json
18
+
19
+ - name : Check if the second-to-last day is included
20
+ run : |
21
+ TODAY=$(date -u +"%Y-%m-%d")
22
+ SECOND_LAST_DAY=$(date -u -d "$TODAY - 2 days" +"%Y-%m-%d")
23
+ if grep -q "$SECOND_LAST_DAY" optimalfraction.json; then
24
+ echo "The second-to-last day ($SECOND_LAST_DAY) is included in the JSON data."
25
+ else
26
+ echo "The second-to-last day ($SECOND_LAST_DAY) is NOT included in the JSON data."
27
+ exit 1
28
+ fi
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments