Files
privacy.sexy/.github/actions/force-ipv4
undergroundwires 52fadcd617 ci/cd: fix IPv6 timeouts with force-ipv4 action
This commit introduces the `force-ipv4` GitHub action to address
connectivity issues caused by the lack of IPv6 support in GitHub
runners. Details:
- actions/runner#3138
- actions/runner-images#668

This change solves connection problems when Node's `fetch` API fails due
to `UND_ERR_CONNECT_TIMEOUT` errors. Details:
- actions/runner-images#9540
- actions/runner#3213

This action disables IPv6 at the system level, ensuring all outging
requests use IPv4. Resolving connectivity issues when running external
URL checks and Docker build checks.

This solution is a temporary workaround until GitHub runners support
IPv6 or Node `fetch` API has a working solution such as Happy Eyeball.
Detais:
- nodejs/node#41625
- nodejs/undici#1531
2024-03-29 13:11:27 +01:00
..

force-ipv4

Overview

This GitHub action enforces IPv4 for all outgoing network requests. It addresses connectivity issues encountered in GitHub runners, where IPv6 requests may lead to timeouts due to the lack of IPv6 support 1 2.

Background

Some applications attempt network connections over IPv6. Such as requests made by Node's fetch API causes UND_ERR_CONNECT_TIMEOUT errors 3 4. This happens when the software cannot handle this such as by using Happy Eyeballs 5 6.

Usage

To use this action in your GitHub workflow, add the following step before any job that requires network access:

- name: Enforce IPv4 Connectivity
  uses: ./.github/actions/force-ipv4

Note

This action is a workaround addressing specific IPv6-related connectivity issues on GitHub runners and may not be necessary if GitHub's infrastructure evolves to fully support IPv6 in the future.