Created
September 29, 2025 11:12
-
-
Save rfc2822/35e2a5f1644a6a5d4c103f274fb98e01 to your computer and use it in GitHub Desktop.
Fetch Github IPs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # OUTPUT_FILE="/etc/hosts.github" | |
| OUTPUT_FILE="hosts.github" | |
| GITHUB_META_API="https://api.github.com/meta" | |
| SCRIPT=`realpath $0` | |
| echo "# GitHub Actions Runner IP Ranges [$GITHUB_META_API]" > $OUTPUT_FILE | |
| echo "# Fetched by $SCRIPT on $(date)" >> $OUTPUT_FILE | |
| echo -e >> $OUTPUT_FILE | |
| curl -s "$GITHUB_META_API" | jq -r '.actions[]' >> $OUTPUT_FILE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment