Cannot write to $GITHUB_OUTPUT
file from Docker action using user with UID 1000
#10915
Open
1 of 15 tasks
Labels
Description
We have a custom action that spins up an Arch Linux Docker container and runs a shell script within it that writes to
$GITHUB_OUTPUT
. The Dockerfile creates a user namedbuild
with UID 1000, and invokesUSER build
soentrypoint.sh
executes as this non-root user. (We cannot run the script we need to as root.)This has been working fine up until today, where it started failing. It failed when running with the
20241103.1.0
runner image (ubuntu-20.04) but passed a few hours earlier with the20241006.1.0
runner image.We're getting a "Permission denied" error when attempting to append to
$GITHUB_OUTPUT
. I'm guessing the user owning the$GITHUB_OUTPUT
file outside of the container is no longer assigned UID 1000 and/or the permissions on the file don't grant all users write permissions, leading to this issue.Platforms affected
Runner images affected
Image version and build link
Image: ubuntu-20.04
Version: 20241103.1.0
Screenshot of the failing step:
Output copied below, in case it's useful to have it in text form:
Is it regression?
Yes, it worked on 20241006.1.0 a few hours earlier
Expected behavior
We should be able to write to the file path at
$GITHUB_OUTPUT
from within a Docker container action without errors.Actual behavior
The write fails with "Permission denied".
Repro steps
I have not explicitly tested this, but my expectation is that the following would reproduce the issue (it's a simplification of our failing action):
Define a Docker action with the following Dockerfile:
Define the following
entrypoint.sh
file:Use that action in a workflow running on
ubuntu-20.04
that uses the new runner image.The text was updated successfully, but these errors were encountered: