Run jobs as a user different from default entrypoint user

Hi,

I use customized build images which in their Dockerfile define a user under which the build steps are to be done.

One of software projects using those build containers contains a test step which requires the user to be different from the user running PID 1, which on a regular Linux system would be either initd or systemd owned by root. That guarantees, that a regular user can’t access /proc/1/*, which is checked against by my software project in its unit tests.

With gitea actions, PID 1 is generally a /bin/sleep <maximum job time>, but unfortunately this is run as the same user running the test step, resulting in my test case to fail.

Any ideas how to configure the workflow or gitea itself so that PID 1 is ideally owned by root and my test case can succeed again?