Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Action Metadata Main Entry Point Code #185

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,31 +83,29 @@ runs:
PRITUNL_CONCEALED_OUTPUTS: ${{ inputs.concealed-outputs }}
shell: bash
run: |
# Entrypoint for executing 'pritunl-client.sh' script
# Main entry point for executing the 'pritunl-client.sh' script

# Define the pritunl_client function
# Define the 'pritunl_client' function, which sets up and runs the script
pritunl_client() {
# Declare a local variable to store the path separator
# (using a local variable to avoid polluting the global namespace)
# Declare a local variable to store the path 'separator', to avoid polluting the global namespace
local separator

# Determine the path separator based on the runner OS
case "${RUNNER_OS}" in
Windows)
# Use a backslash (\) for Windows (required for Windows paths)
# Use a backslash (\) for Windows paths
separator='\'
;;
*)
# Catch-all for non-Windows OSes (Linux, macOS, etc.)
# Use a forward slash (/) for paths
# Use a forward slash (/) for non-Windows OSes (Linux, macOS, etc.)
separator='/'
;;
esac

# Construct and run the full path to the 'pritunl-client.sh' script
# using the GITHUB_ACTION_PATH and the separator
# Construct the full path to the 'pritunl-client.sh' script using 'GITHUB_ACTION_PATH' and the 'separator'
# and run the script
"${GITHUB_ACTION_PATH}${separator}pritunl-client.sh"
}

# Call the pritunl_client function to start the script
# Call the 'pritunl_client' function to start the script execution
pritunl_client