Files
act_runner/internal/act/runner/testdata/actions-environment-and-context-tests/docker/entrypoint.sh
T
Lunny Xiao 825c6af07c refactor: move act under internal
The runner is an application, not a library. `act/model` and
`act/exprparser` were the last packages anything outside this repository
consumed and they now live in actionslib, so nothing needs the rest of
`act` to be importable, and keeping it importable invites the coupling
that was just removed.

Import paths only, the files are unchanged.

Assisted-by: Codet:GPT-5.1-Codex
2026-08-07 21:40:48 -07:00

27 lines
563 B
Bash
Executable File

#!/bin/sh
checkEnvVar() {
name=$1
value=$2
allowEmpty=$3
if [ -z "$value" ]; then
echo "Missing environment variable: $name"
exit 1
fi
if [ "$allowEmpty" != "true" ]; then
test=$(echo "$value" |cut -f 2 -d "=")
if [ -z "$test" ]; then
echo "Environment variable is empty: $name"
exit 1
fi
fi
echo "$value"
}
checkEnvVar "GITHUB_ACTION" "$(env |grep "GITHUB_ACTION=")" false
checkEnvVar "GITHUB_ACTION_REPOSITORY" "$(env |grep "GITHUB_ACTION_REPOSITORY=")" true
checkEnvVar "GITHUB_ACTION_REF" "$(env |grep "GITHUB_ACTION_REF=")" true