You've already forked github-action
mirror of
https://github.com/zerotier/github-action.git
synced 2026-05-22 16:27:40 -07:00
56 lines
1.4 KiB
YAML
56 lines
1.4 KiB
YAML
name: zerotier
|
|
on: [ push ]
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
matrix:
|
|
# os: [ ubuntu-latest ]
|
|
os: [ ubuntu-latest, macos-latest, windows-latest ]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v4.0.0
|
|
|
|
- name: zerotier
|
|
uses: ./
|
|
with:
|
|
network_id: ${{ secrets.ZEROTIER_NETWORK_ID }}
|
|
auth_token: ${{ secrets.ZEROTIER_CENTRAL_TOKEN }}
|
|
|
|
- name: ping host
|
|
shell: bash
|
|
run: |
|
|
count=10
|
|
while ! ping -c 1 ${{ secrets.ZEROTIER_HOST_IP }} ; do
|
|
echo "waiting..." ;
|
|
sleep 1 ;
|
|
let count=count-1
|
|
done
|
|
echo "ping success"
|
|
|
|
test:
|
|
strategy:
|
|
matrix:
|
|
# os: [ ubuntu-latest ]
|
|
os: [ ubuntu-latest, macos-latest, windows-latest ]
|
|
runs-on: ${{ matrix.os }}
|
|
if: ${{ github.ref_name }} == "main"
|
|
steps:
|
|
- name: zerotier
|
|
uses: zerotier/github-action@main
|
|
with:
|
|
network_id: ${{ secrets.ZEROTIER_NETWORK_ID }}
|
|
auth_token: ${{ secrets.ZEROTIER_CENTRAL_TOKEN }}
|
|
|
|
- name: ping host
|
|
shell: bash
|
|
run: |
|
|
count=10
|
|
while ! ping -c 1 ${{ secrets.ZEROTIER_HOST_IP }} ; do
|
|
echo "waiting..." ;
|
|
sleep 1 ;
|
|
let count=count-1
|
|
done
|
|
echo "ping success"
|