Blog

ZeroTier and Github Actions

Share on:

The TL;DR

ZeroTier, a software-defined networking platform, joins GitHub Actions CI/CD runners to an encrypted peer-to-peer mesh overlay that handles NAT traversal and authentication automatically. ZeroTier gives Ubuntu, macOS, and Windows runners temporary access to internal file servers, package repositories, container registries, and APIs like OpenShift or VMware, then revokes that access once the workflow finishes. Adding ZeroTier to a workflow’s YAML configuration is what turns a public CI runner into a temporary, authenticated member of a private network.

ZeroTier is an SDN platform that allows users to create virtual networks that can span multiple devices, locations, and cloud providers. ZeroTier creates an encrypted peer-to-peer mesh overlay that handles NAT traversal and authentication to network resources.

The ZeroTier Github Action allows users to easily integrate ZeroTier into their CI/CD workflows by temporarily connecting runners to a private ZeroTier network.

- name: ZeroTier
  uses: zerotier/github-action@v1
  with:
    network_id: ${{ secrets.ZEROTIER_NETWORK_ID }}
    auth_token: ${{ secrets.ZEROTIER_CENTRAL_TOKEN }}

- name: ping host
  shell: bash
  run: |
    count=5
    while ! ping -c 1 ${{ secrets.ZEROTIER_HOST_IP }} ; do
      echo "waiting..." ;
      sleep 1 ;
      let count=count-1
    done
    echo "ping success"
ZeroTier and Github Actions can now be used to securely access internal file servers, package repositories, and container registries, as well as enterprise API endpoints like OpenShift and VMWare.

This action works on the Ubuntu, MacOS and Windows runner types.

After your workflow has completed, it automatically cleans up by revoking the runner’s access to the network.

Related Posts

Sign Up for Our Newsletter

Don’t miss a single update. Sign up to receive occasional networking content and news.

By providing your email address, you agree to receive marketing communications from ZeroTier. We’ll make sure it’s awesome!

Our Privacy Policy has more information on how we use your personal information. You can unsubscribe from our communications at any time. Your communications, your choice.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.