File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed 
.github/workflows/containers/github-action-ci-tooling Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,14 @@ RUN apt-get update && \
3737    apt-get clean && \
3838    rm -rf /var/lib/apt/lists/*
3939
40+ #  Create a new user with id 1001 as that is the user id that
41+ #  Github Actions uses to perform the checkout action.
42+ RUN  useradd gha -u 1001 -m -s /bin/bash
43+ RUN  adduser gha sudo
44+ RUN  echo '%sudo ALL=(ALL) NOPASSWD:ALL'  >> /etc/sudoers
45+ #  Don't set USER gha right away because we still need to install packages
46+ #  as root in 'ci-container-code-format' and 'ci-container-code-lint' containers
47+ 
4048
4149FROM  base AS ci-container-code-format
4250ARG  LLVM_VERSION
@@ -51,6 +59,8 @@ ENV PATH=${LLVM_SYSROOT}/bin:${PATH}
5159COPY  llvm/utils/git/requirements_formatting.txt requirements_formatting.txt
5260RUN  pip install -r requirements_formatting.txt --break-system-packages && \
5361    rm requirements_formatting.txt
62+ USER  gha
63+ WORKDIR  /home/gha
5464
5565
5666FROM  base AS ci-container-code-lint
@@ -80,3 +90,5 @@ RUN apt-get update && \
8090COPY  llvm/utils/git/requirements_linting.txt requirements_linting.txt
8191RUN  pip install -r requirements_linting.txt --break-system-packages && \
8292    rm requirements_linting.txt
93+ USER  gha
94+ WORKDIR  /home/gha
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments