GitHub Actions IP Ranges for whitelisting on Azure VM #177686
Replies: 5 comments
This comment was marked as off-topic.
This comment was marked as off-topic.
-
|
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
-
|
I ended implementing this without an allow list:
I ended up with a GHA workflow that includes roughly this: concurrency:
group: my-group
cancel-in-progress: true
jobs:
my-job:
runs-on: ubuntu-latest
steps:
- name: Login to Azure
uses: azure/login@v2
with:
# ...
- name: Discover GitHub runner IP address
id: ip
uses: haythem/public-ip@v1.3
- name: Add GitHub runner IP address to Bastion allowlist
uses: azure/cli@v2
with:
inlineScript: |
az network nsg rule update \
--ids "${{ secrets.BASTION_NSG_RULE_ID }}" \
--source-address-prefixes "${{ steps.ip.outputs.ipv4 }}/32" |
Beta Was this translation helpful? Give feedback.
-
|
Hey! I saw your post about the Azure VM and the 6,000 IP ranges. That is definitely the 'hard way' to do it! Whitelisting the entire GitHub IP range is a security risk and, as you saw, Azure blocks it anyway. |
Beta Was this translation helpful? Give feedback.
-
|
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Why are you starting this discussion?
Question
What GitHub Actions topic or product is this about?
Actions Runner
Discussion Details
I have an Azure Ubuntu VM on which I have deployed my frontend as well as backend. In order to deploy the latest code from GitHub to Azure VM, I had to manually run some steps each time, which was a pain for me. So I wrote a yml file to automate this process with the help of GitHub Actions, but the script is unable to access the VM because the IP of GitHub Actions Runner changes everytime it runs. I found GitHub Actions IP Ranges on GitHub API. But after whitelisting 4000 IP Ranges, I hit the limit to add more IP Ranges, there are approximately 6000 IP Ranges listed. I want to know if there is any better way to implement this thing. If anyone could help me with this, it'll be really appreciated.
Beta Was this translation helpful? Give feedback.
All reactions