lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 5d5054f 18/28: Use correct permissions for th


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 5d5054f 18/28: Use correct permissions for the Git checkout
Date: Wed, 12 May 2021 18:14:45 -0400 (EDT)

branch: master
commit 5d5054f5d45c7f292756419ab77ee9223f16e978
Author: Vadim Zeitlin <vadim@tt-solutions.com>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Use correct permissions for the Git checkout
    
    Actions are not affected by the custom shell command we use and still
    run as root, so adjust the permissions after running actions/checkout.
---
 .github/workflows/ci.yml | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index ec327ca..6352caa 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -108,6 +108,12 @@ jobs:
 
       - name: System and environment setup
         run: |
+          normal_uid=`id --user`
+
+          # The checkout actions runs as root and there doesn't seem to be any
+          # way to change this, so just adjust the owner after checkout.
+          sudo chown -R $normal_uid $GITHUB_WORKSPACE
+
           sudo sed -i'' -e 's/^int _putenv/_CRTIMP int _putenv/' 
/usr/share/libtool/build-aux/ltmain.sh
 
           echo "coefficiency=--jobs=`nproc`" >> $GITHUB_ENV
@@ -139,7 +145,6 @@ jobs:
           echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> $GITHUB_ENV
 
           # Create directories required by lmi.
-          normal_uid=`id --user`
           for d in /opt/lmi /opt/lmi/print /etc/opt/lmi /srv/cache_for_lmi; do
             sudo mkdir --parents $d
             sudo --preserve-env chown $normal_uid $d



reply via email to

[Prev in Thread] Current Thread [Next in Thread]