add debug for env vars
All checks were successful
run tests / run-container (push) Successful in 7s

This commit is contained in:
Ivan Schaller 2023-08-16 12:16:35 +02:00
parent e30de98e6a
commit 0728da8404
Signed by: olofvndrhr
GPG key ID: 2A6BE07D99C8C205
2 changed files with 5 additions and 3 deletions

View file

@ -21,7 +21,7 @@ jobs:
image: debian:11-slim image: debian:11-slim
volumes: /tmp/:/tmp/ volumes: /tmp/:/tmp/
options: -e TESTENV=${{ gitea.workspace }} options: -e TESTENV=${{ gitea.workspace }}
run: env; echo "test" run: env
- name: multi-line options - name: multi-line options
uses: https://git.44net.ch/actions/docker-run-action@main uses: https://git.44net.ch/actions/docker-run-action@main
@ -35,6 +35,5 @@ jobs:
-e TESTENV=${{ gitea.workspace }} -e TESTENV=${{ gitea.workspace }}
-e TESTENV2=TESTENV2 -e TESTENV2=TESTENV2
run: >- run: >-
env;
sh -c sh -c
echo "test" echo "test"

View file

@ -2,7 +2,6 @@
set -euo pipefail set -euo pipefail
# set debugging
if [ -n "${INPUT_DEBUG}" ]; then if [ -n "${INPUT_DEBUG}" ]; then
set -x set -x
fi fi
@ -13,6 +12,10 @@ RUN_COMMAND=()
env | grep -v -E "^(#|;| |PATH|SHLVL|HOSTNAME|DOCKER_*)" | awk '$1 ~ /^\w+=/' | xargs -0 > "/docker-run-action.env" 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 # login to container registry
if [ -n "${INPUT_USERNAME}" ]; then if [ -n "${INPUT_USERNAME}" ]; then
printf -- '%s' "'${INPUT_PASSWORD}'" | docker login "${INPUT_REGISTRY}" -u "${INPUT_USERNAME}" --password-stdin printf -- '%s' "'${INPUT_PASSWORD}'" | docker login "${INPUT_REGISTRY}" -u "${INPUT_USERNAME}" --password-stdin