@@ -23,10 +23,14 @@ runs:
2323 run : |
2424 set -e
2525
26+ debug_args=
27+ debug_args_image="-exc"
2628 debug='${{inputs.debug}}'
2729 if [[ "${debug}" == "true" ]]; then
2830 echo "[🐙] Enabling debug logging."
2931 set -x
32+ debug_args="2>/dev/null"
33+ debug_args_image="-ec"
3034 fi
3135
3236 if [[ '${{inputs.command}}' == '' ]]; then
@@ -55,56 +59,31 @@ runs:
5559 fi
5660
5761 printf "[🐙] Building ephemeral container image from Wolfi packages... "
58- if [[ "${debug}" == "true" ]]; then
59- docker run --rm \
60- -v ${PWD}:/work \
61- -w /work \
62- '${{ inputs.apko-image }}' \
63- build \
64- --arch=x86_64 \
65- --sbom=false \
66- wolfi-act.apko.config.yaml \
67- wolfi-act:latest \
68- wolfi-act.tar
69- else
70- docker run --rm \
71- -v ${PWD}:/work \
72- -w /work \
73- '${{ inputs.apko-image }}' \
74- build \
75- --arch=x86_64 \
76- --sbom=false \
77- wolfi-act.apko.config.yaml \
78- wolfi-act:latest \
79- wolfi-act.tar 2>/dev/null
80- fi
62+ eval docker run --rm \
63+ -v ${PWD}:/work \
64+ -w /work \
65+ '${{ inputs.apko-image }}' \
66+ build \
67+ --arch=x86_64 \
68+ --sbom=false \
69+ wolfi-act.apko.config.yaml \
70+ wolfi-act:latest \
71+ wolfi-act.tar "${debug_args}"
72+
8173 echo "done."
8274
8375 printf "[🐙] Loading ephemeral container image into Docker... "
84- if [[ "${debug}" == "true" ]]; then
85- docker load < wolfi-act.tar
86- else
87- docker load < wolfi-act.tar >/dev/null
88- fi
76+ eval docker load < wolfi-act.tar "${debug_args}"
8977 echo "done."
9078
9179 env > wolfi-act.github.env
9280
9381 echo "[🐙] Running the following command in ephemeral container image:"
9482 echo '${{ inputs.command }}'
9583 echo "[🐙] Output:"
96- if [[ "${debug}" == "true" ]]; then
97- docker run -i --rm --platform linux/amd64 \
98- -v ${PWD}:/work \
99- -w /work \
100- --env-file wolfi-act.github.env \
101- wolfi-act:latest-amd64 \
102- bash -exc '${{ inputs.command }}'
103- else
104- docker run -i --rm --platform linux/amd64 \
105- -v ${PWD}:/work \
106- -w /work \
107- --env-file wolfi-act.github.env \
108- wolfi-act:latest-amd64 \
109- bash -ec '${{ inputs.command }}'
110- fi
84+ docker run -i --rm --platform linux/amd64 \
85+ -v ${PWD}:/work \
86+ -w /work \
87+ --env-file wolfi-act.github.env \
88+ wolfi-act:latest-amd64 \
89+ bash "${debug_args_image}" '${{ inputs.command }}'
0 commit comments