Add IPv6 compatibility to GitHub Actions with two lines

GitHub Actions is still only use IPv4 for netowork connections and it will fail to connect to IPv6 only networks like Supabase. Here's a workaround to use IPv6.

GitHub is the most popular code repository available online. Professionals and amateurs codes use it for code storage or to follow a project development. GitHub also provides a continuous integration and deployment (CI/CD) feature to run and build applications in the cloud. Open source developers can use this to build and provide executables for their project if their PC are low end devices.

It is available for free and premium users. The only limit for free users is that the project should be public, otherwise there is a limit to how many CPU hours your private project can use within a month.

A screenshot of VSCode screen with github workflow yaml file
A screenshot of VSCode screen with github workflow yaml file

Another limitation of GitHub Actions is that it only runs on IPv4 protocol. IPv6 has been around 28 years; it is still not available when you run a GitHub actions workflow.

Developers have been asking Microsoft to include IPv6 in GitHub Actions, but it is yet to be implemented. Use a workaround to interact with IPv6 only networks.

AWS recently began charging for IPv4 and Supabase only support IPv6 in their free tier. I found connecting to Supabase fails with GitHub Actions. I needed a workaround.

I found it wasn’t hard. The workaround is to use CloudFlare Warp to gain an IPv6 address. Somebody had already built an action to run CloudFlare Warp in GitHub Actions. You can add two lines of the code to install Warp and interact with IPv6. All you need are 2 lines to your GitHub Actions workflow yaml files.

- name: Setup WARP
      uses: fscarmen/warp-on-actions@v1.0

This is the code before inclusion of CloudFlare Warp in GitHub Actions.

jobs:
  cron:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - name: Set up Python 3.12
      uses: actions/setup-python@v3
      with:
        python-version: "3.12"

This is the updated version:

jobs:
  cron:
    runs-on: ubuntu-latest
    steps:
    - name: Setup WARP
      uses: fscarmen/warp-on-actions@v1.0
    - uses: actions/checkout@v3
    - name: Set up Python 3.12
      uses: actions/setup-python@v3
      with:
        python-version: "3.12"

This will allow your GitHub Actions to interact with IPv6 only protocols. Your actions will continue to run normally with no complicated code or hacks.

Leave a Reply