Skip to content

Commit a314230

Browse files
Remove CodeQL analysis workflow and add daily update check workflow
1 parent 885e334 commit a314230

File tree

2 files changed

+28
-72
lines changed

2 files changed

+28
-72
lines changed

.github/workflows/check_updates.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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

.github/workflows/codeql-analysis.yml

-72
This file was deleted.

0 commit comments

Comments
 (0)