Skip to content

Commit 83cb7b8

Browse files
Refactor check_updates.yml to use environment variable for bypass header in JSON fetch
1 parent d50cf13 commit 83cb7b8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/check_updates.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,14 @@ jobs:
99
runs-on: ubuntu-latest
1010

1111
steps:
12-
- name: Check if yesterday is included
12+
- name: Fetch JSON data
13+
env:
14+
BYPASS_HEADER: ${{ secrets.BYPASS_HEADER }}
1315
run: |
14-
curl -v -H "x-test: ${{ secrets.BYPASS_HEADER }}" -o optimalfraction.json https://charts-core.peercoinexplorer.net/optimalfraction.json
16+
curl -v -H "x-test: $BYPASS_HEADER" -o optimalfraction.json https://charts-core.peercoinexplorer.net/optimalfraction.json
1517
18+
- name: Check if yesterday is included
19+
run: |
1620
jq empty optimalfraction.json || { echo "Invalid JSON"; exit 1; }
1721
1822
TODAY=$(date -u +"%Y-%m-%d")

0 commit comments

Comments
 (0)