A PowerShell script which generates a list of NGINX allow
rules of GitHub Actions runner IP addresses based on GitHub's public API.
./GenerateGitHubActionsNginxConf.ps1 > ./github-actions-ip-addresses.conf
Once your configuration file is generated, you can then include it in your NGINX server's configuration.
The below example assumes that the generated github-actions-ip-addresses.conf
config file is located under the /etc/nginx/conf
directory:
server {
root /var/www/example-darianbenam-dot-com;
include conf/github-actions-ip-addresses.conf;
deny all;
# ...
}