Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/haythem/public-ip
Queries GitHub actions runner's public IP address
https://github.com/haythem/public-ip
actions github-actions
Last synced: about 2 months ago
JSON representation
Queries GitHub actions runner's public IP address
- Host: GitHub
- URL: https://github.com/haythem/public-ip
- Owner: haythem
- License: mit
- Created: 2020-03-29T19:19:23.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-07-10T14:06:43.000Z (6 months ago)
- Last Synced: 2024-10-26T11:38:30.518Z (2 months ago)
- Topics: actions, github-actions
- Language: TypeScript
- Homepage:
- Size: 446 KB
- Stars: 114
- Watchers: 2
- Forks: 26
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-actions - Public IP - Queries GitHub actions runner's public IP address. (Community Resources / Utility)
- fucking-awesome-actions - Public IP - Queries GitHub actions runner's public IP address. (Community Resources / Utility)
- awesome-workflows - Public IP - Queries GitHub actions runner's public IP address. (Community Resources / Utility)
README
# Public IP
> Queries the GitHub actions runner's public IP address using [ipify](https://www.ipify.org/)
### Motivation
GitHub actions shared runners are hosted in **Azure** (Windows & Linux) and **Mac Stadium** for macOS, so whitelisting all these infrastructures can be difficult and needs to be updated every once in a while.[GitHub Help](https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners)
This action allows you to whitelist the runner's address and remove it once the pipeline finishes.
## Usage
### Inputs
* `maxRetries` - How many retries on the ipify API before failing. Default: `5`
### Outputs
* `ipv4` - Public IPv4 of the runner
* `ipv6` - Public IPv6 of the runner. If not available the `ipv4` will be returned### Example workflow
```yaml
name: Public IPon: push
jobs:
build:
runs-on: ubuntu-lateststeps:
- name: Public IP
id: ip
uses: haythem/[email protected]- name: Print Public IP
run: |
echo ${{ steps.ip.outputs.ipv4 }}
echo ${{ steps.ip.outputs.ipv6 }}
```## Contributing
We would love for you to contribute to `haythem/public-ip`, pull requests are welcome !## License
The scripts and documentation in this project are released under the [MIT License](LICENSE)