Add option to source env from file
All checks were successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/dockerhub Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
All checks were successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/dockerhub Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
This commit is contained in:
parent
8aa00208d3
commit
9769ea1ba4
2 changed files with 10 additions and 0 deletions
|
@ -5,6 +5,15 @@ set -eu;
|
|||
## check input
|
||||
##
|
||||
|
||||
if [[ -n "${PLUGIN_ENV_FILE:-}" ]]; then
|
||||
if [[ ! -f "PLUGIN_ENV_FILE" ]]; then
|
||||
echo "Env file $PLUGIN_ENV_FILE not found."
|
||||
exit 1
|
||||
fi
|
||||
# shellcheck source=/dev/null
|
||||
source "$PLUGIN_ENV_FILE"
|
||||
fi
|
||||
|
||||
BUILDCTL_CONTEXT=${PLUGIN_CONTEXT:-$(pwd)}
|
||||
BUILDCTL_DOCKERFILE=$(dirname "${PLUGIN_DOCKERFILE:-$BUILDCTL_CONTEXT/Dockerfile}")
|
||||
if [[ ! -f $BUILDCTL_DOCKERFILE/Dockerfile ]]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue