Skip to content

Commit 595dafd

Browse files
Refactor update check workflow to validate JSON response and remove unnecessary checkout step
1 parent 8461f12 commit 595dafd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/check_updates.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ jobs:
99
runs-on: ubuntu-latest
1010

1111
steps:
12-
- name: Checkout repository
13-
uses: actions/checkout@v2
14-
1512
- name: Check if yesterday is included
1613
run: |
1714
curl -H "Cache-Control: no-cache" -o optimalfraction.json https://charts-core.peercoinexplorer.net/optimalfraction.json
15+
16+
jq empty optimalfraction.json || { echo "Invalid JSON"; exit 1; }
17+
1818
TODAY=$(date -u +"%Y-%m-%d")
1919
YESTERDAY=$(date -u -d "$TODAY - 1 day" +"%Y-%m-%d")
2020
if grep -q "$YESTERDAY" optimalfraction.json; then

0 commit comments

Comments
 (0)