Skip to content

Commit

Permalink
Update update_github_ips.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
TaEduard authored Feb 25, 2025
1 parent c42e2a9 commit e0ec906
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/update_github_ips.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,17 @@ jobs:
- name: Fetch GitHub meta
run: |
echo "Fetching GitHub IP ranges..."
meta_json=$(curl -s https://api.github.com/meta)
echo "$meta_json" | jq . > github-ips.json
echo "$meta_json" | jq '.hooks' > github-hooks-ips.json
META_JSON=$(curl -s https://api.github.com/meta)
# Pretty-print the entire meta JSON to github-ips.json
echo "$META_JSON" | jq . > github-ips.json
# Extract just the ".hooks" array to github-hooks-ips.json
echo "$META_JSON" | jq '.hooks' > github-hooks-ips.json
# Print the contents of both files to the console
cat github-ips.json
cat github-hooks-ips.json
- name: Commit changes
run: |
Expand Down

0 comments on commit e0ec906

Please sign in to comment.