Skip to content

Commit

Permalink
adding GITHUB_ACTION_PATH (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
RichieCahill authored Feb 11, 2024
1 parent 4d36a5b commit c8946b0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
10 changes: 5 additions & 5 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: "ZeroTier"
description: "Connect your Github Action workflow to ZeroTier"
branding:
icon: 'globe'
color: 'gray-dark'
icon: "globe"
color: "gray-dark"

on:
workflow_call:
Expand All @@ -20,7 +20,7 @@ inputs:
default: "https://my.zerotier.com/api/v1"

runs:
using: 'composite'
using: "composite"
steps:
- name: zerotier
uses: zerotier/github-action/util/post@main
Expand All @@ -29,5 +29,5 @@ runs:
AUTH_TOKEN: ${{ inputs.auth_token }}
NETWORK_ID: ${{ inputs.network_id }}
with:
main: ./main.sh
post: ./post.sh
main: $GITHUB_ACTION_PATH/main.sh
post: $GITHUB_ACTION_PATH/post.sh
6 changes: 4 additions & 2 deletions main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@ set -euo pipefail
IFS=$'\n\t'

echo "⏁ Installing ZeroTier"
# /home/runner/work/zerotier-github-action/zerotier-github-action/./
echo $GITHUB_ACTION_PATH

case $(uname -s) in
MINGW64_NT?*)
pwsh "./util/install.ps1"
pwsh "$GITHUB_ACTION_PATH/util/install.ps1"
ztcli="/c/Program Files (x86)/ZeroTier/One/zerotier-cli.bat"
member_id=$("${ztcli}" info | awk '{ print $3 }')
;;
*)
. ./util/install.sh &>/dev/null
. $GITHUB_ACTION_PATH/util/install.sh &>/dev/null
member_id=$(sudo zerotier-cli info | awk '{ print $3 }')
;;
esac
Expand Down

0 comments on commit c8946b0

Please sign in to comment.