fix multiline
Some checks failed
run tests / run-container (push) Failing after 5s

This commit is contained in:
Ivan Schaller 2023-08-16 11:44:42 +02:00
parent 4a1ee59b85
commit 6a9f799df0
Signed by: olofvndrhr
GPG key ID: 2A6BE07D99C8C205
4 changed files with 13 additions and 12 deletions

View file

@ -26,12 +26,12 @@ jobs:
uses: https://git.44net.ch/actions/docker-run-action@main
with:
image: debian:11-slim
volumes: |
volumes: >-
/tmp/:/tmp/
README.md:/README.md
options: |
options: >-
-e TESTENV=${{ gitea.workspace }}
-e TESTENV2=TESTENV2
run: |
run: >-
/bin/sh -c
echo "test"

View file

@ -22,12 +22,12 @@
password: ${{ secrets.DOCKER_PASSWORD }}
registry: ghcr.io
image: some-image:latest
volumes: |
volumes: >-
./testscript.sh:/testscript.sh
/abc/def:/tmp
options: |
options: >-
--user abc
run: |
run: >-
/bin/bash
/testscript.sh
```
@ -67,7 +67,7 @@ _Note: The shell must be installed in the container_
with:
image: docker:latest
shell: bash
run: |
run: >-
echo "first line"
echo "second line"
```

View file

@ -10,7 +10,7 @@ env | grep -v -E "^(#|;| |PATH|SHLVL|HOSTNAME|DOCKER_*)" | awk '$1 ~ /^\w+=/' |
# login to container registry
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
fi
# set custom network
@ -24,19 +24,19 @@ if [ "${INPUT_MOUNT_SOCKET,,}" == "true" ]; then
fi
# map volumes
mapfile -t TMP_VOLUMES < <(printf '%b' "${INPUT_VOLUMES}")
mapfile -t -d ' ' TMP_VOLUMES < <(printf '%s' "${INPUT_VOLUMES}")
for vol in "${TMP_VOLUMES[@]}"; do
RUNTIME_OPTIONS+=(--volume "${vol}")
done
# get custom options
mapfile -t TMP_OPTIONS < <(printf '%b' "${INPUT_OPTIONS}")
mapfile -t -d ' ' TMP_OPTIONS < <(printf '%s' "${INPUT_OPTIONS}")
for opt in "${TMP_OPTIONS[@]}"; do
CUSTOM_OPTIONS+=("${opt}")
done
# get run command
mapfile -t TMP_RUN < <(printf '%b' "${INPUT_RUN}")
mapfile -t -d ' ' TMP_RUN < <(printf '%s' "${INPUT_RUN}")
for cmd in "${TMP_RUN[@]}"; do
RUN_COMMAND+=("${cmd}")
done

View file

@ -1,5 +1,6 @@
a:
b: |
b: >-
-e test22
test
test2
test3