From 0728da8404d7b0a66f903cbce24557ce3ecca8d1 Mon Sep 17 00:00:00 2001 From: Ivan Schaller Date: Wed, 16 Aug 2023 12:16:35 +0200 Subject: [PATCH] add debug for env vars --- .gitea/workflows/tests.yml | 3 +-- entrypoint.sh | 5 ++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/tests.yml b/.gitea/workflows/tests.yml index 1da473a..f496822 100644 --- a/.gitea/workflows/tests.yml +++ b/.gitea/workflows/tests.yml @@ -21,7 +21,7 @@ jobs: image: debian:11-slim volumes: /tmp/:/tmp/ options: -e TESTENV=${{ gitea.workspace }} - run: env; echo "test" + run: env - name: multi-line options uses: https://git.44net.ch/actions/docker-run-action@main @@ -35,6 +35,5 @@ jobs: -e TESTENV=${{ gitea.workspace }} -e TESTENV2=TESTENV2 run: >- - env; sh -c echo "test" diff --git a/entrypoint.sh b/entrypoint.sh index 7994188..4653706 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -2,7 +2,6 @@ set -euo pipefail -# set debugging if [ -n "${INPUT_DEBUG}" ]; then set -x fi @@ -13,6 +12,10 @@ RUN_COMMAND=() env | grep -v -E "^(#|;| |PATH|SHLVL|HOSTNAME|DOCKER_*)" | awk '$1 ~ /^\w+=/' | xargs -0 > "/docker-run-action.env" +if [ -n "${INPUT_DEBUG}" ]; then + cat "/docker-run-action.env" +fi + # login to container registry if [ -n "${INPUT_USERNAME}" ]; then printf -- '%s' "'${INPUT_PASSWORD}'" | docker login "${INPUT_REGISTRY}" -u "${INPUT_USERNAME}" --password-stdin