Skip to content

Commit aa85add

Browse files
[Github] Default to non-root user in linux CI container
This patch sets the default user in the linux CI container to a non-root user, which enables properly testing a couple of features, particularly in libcxx.
1 parent aaadaee commit aa85add

File tree

1 file changed

+7
-0
lines changed
  • .github/workflows/containers/github-action-ci

1 file changed

+7
-0
lines changed

.github/workflows/containers/github-action-ci/Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,10 @@ RUN apt-get update && \
6060

6161
ENV LLVM_SYSROOT=$LLVM_SYSROOT
6262
ENV PATH=${LLVM_SYSROOT}/bin:${PATH}
63+
64+
# Create a new user to avoid test failures related to a lack of expected
65+
# permissions issues in some tests. Set the user id to 1001 as that is the
66+
# user id that Github Actions uses to perform the checkout action.
67+
RUN useradd gha -u 1001 -m -s /bin/bash
68+
USER gha
69+

0 commit comments

Comments
 (0)