From 9952321d23802e2c4bffadd99b8dc10c96498847 Mon Sep 17 00:00:00 2001 From: Kristof Wevers Date: Wed, 22 Jan 2025 18:19:31 +0100 Subject: [PATCH] feat: Disable writing Python bytecode Permission issues can occur on the Python bytecode files as the container entrypoint is being run as the root user. When e.g. using a custom parser the bytecode file will be owned by the root user instead of the user running the action. This can cause subsequent steps to fail. For example when running actions/checkout after python-semantic-release it will try to do a `git clean -ffdx` which will fail to remove the pyc file. --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 770236ff3..489b41bee 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,4 +28,6 @@ RUN \ ENV PSR_DOCKER_GITHUB_ACTION=true +ENV PYTHONDONTWRITEBYTECODE=1 + ENTRYPOINT ["/bin/bash", "-l", "/psr/action.sh"]