Skip to content

Commit 5d528bd

Browse files
committed
Fix container action to properly pass command input
The issue was using environment variable ${INPUT_RUN} instead of GitHub Actions parameter ${{ inputs.run }}. This caused commands to be empty in the Docker containers. Fixed by: - Reverting to direct parameter substitution ${{ inputs.run }} - Removing debug code that was interfering with execution - Keeping PYTHONUNBUFFERED=1 for proper output display This should restore test output visibility in Linux Docker jobs.
1 parent e33e314 commit 5d528bd

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

.github/actions/run-in-container/action.yml

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,9 @@ runs:
2020
- name: Run command
2121
env:
2222
INPUT_VOLUMES: ${{ inputs.volumes }}
23-
INPUT_IMAGE: ${{ inputs.image }}
24-
INPUT_RUN: ${{ inputs.run }}
2523
run: |
2624
27-
docker pull --quiet ${INPUT_IMAGE}
25+
docker pull --quiet ${{ inputs.image }}
2826
2927
function run() {
3028
docker run --rm \
@@ -86,7 +84,7 @@ runs:
8684
-e PYTHONUNBUFFERED=1 \
8785
$VOLUMES_ARGS \
8886
--entrypoint /bin/bash \
89-
${INPUT_IMAGE} \
87+
${{ inputs.image }} \
9088
--noprofile --norc -eo pipefail /run.sh
9189
9290
}
@@ -102,7 +100,6 @@ runs:
102100
VOLUMES_ARGS=""
103101
run
104102
rm -f "$RUNNER_TEMP/run.sh"
105-
exit
106103
}
107104
108105
trap fix_owners EXIT
@@ -115,16 +112,7 @@ runs:
115112
fi
116113
117114
cat <<"EOF" >"$RUNNER_TEMP/run.sh"
118-
echo "=== Container Debug Info ==="
119-
echo "Working directory: $(pwd)"
120-
echo "Python version: $(python --version 2>&1 || echo 'python not found')"
121-
echo "Python2.7 version: $(python2.7 --version 2>&1 || echo 'python2.7 not found')"
122-
echo "Tox version: $(tox --version 2>&1 || echo 'tox not found')"
123-
echo "Files in workspace:"
124-
ls -la
125-
echo "=== Running command: ${INPUT_RUN} ==="
126-
${INPUT_RUN}
127-
echo "=== Command exit code: $? ==="
115+
${{ inputs.run }}
128116
EOF
129117
130118
set -x

0 commit comments

Comments
 (0)