Running GitHub Actions unders specific, existing Windows user

74 views Asked by At

I am trying to run a GHA workflow in a GitHub-hosted runner for Windows (windows-latest) under a specific, already existing Windows user instead of the default C:\Users\runneradmin.

Options involving net user or runas apparently attempt to create a new, local user in the runner. I need to add to the runner an already existing AD user, but I'm a little lost going looking at the ActiveDirectory module.

For context, I need to run the workflow as a particular user (from a particular domain) because the flow uses digital certificates (and a cert manager called RedTrust) that are assigned to this particular user. Up until now I have been running my GHA workflow under a self-hosted Windows machine (AWS EC2 instance) where the user already exists, but I am now tasked with doing the same in a GitHub-hosted runner.

I've tried asking the IT department but they seem confused as to what I'm asking so before I ask them again, or keep trying various powershell commands, I'm hoping to get a broader idea of whether what I'm asking makes sense at all.

0

There are 0 answers