From 08a477d5be54ad9929c8f0005063ebd7f35825b7 Mon Sep 17 00:00:00 2001 From: David Bieber Date: Tue, 15 Apr 2025 02:10:23 +0000 Subject: [PATCH 1/4] Change ownership of GoNoteGo repo to pi user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This ensures that the GoNoteGo repository files are owned by the pi user instead of root, while leaving the supervisord.conf file unchanged. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 23ce5d0..60953dd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -92,6 +92,10 @@ jobs: cd GoNoteGo # Checkout the specific commit git checkout $GITHUB_SHA + + # Change ownership of repository to pi user + # This leaves supervisord.conf unchanged + find /home/pi/code/github/dbieber/GoNoteGo -not -path "*/\.git*" -not -path "*/gonotego/supervisord\.conf" -exec chown pi:pi {} \; echo "Including web app" echo "Checking web app files at /web-app-dist:" From ac9f802290066ec68df281d19824fc680b2603ef Mon Sep 17 00:00:00 2001 From: David Bieber Date: Tue, 15 Apr 2025 02:11:25 +0000 Subject: [PATCH 2/4] Simplify repository ownership change MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use a simpler chown -R command to change ownership of the entire repository to the pi user without any exclusions. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/build.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 60953dd..23c0f2a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -93,9 +93,8 @@ jobs: # Checkout the specific commit git checkout $GITHUB_SHA - # Change ownership of repository to pi user - # This leaves supervisord.conf unchanged - find /home/pi/code/github/dbieber/GoNoteGo -not -path "*/\.git*" -not -path "*/gonotego/supervisord\.conf" -exec chown pi:pi {} \; + # Change ownership of entire repository to pi user + chown -R pi:pi /home/pi/code/github/dbieber/GoNoteGo echo "Including web app" echo "Checking web app files at /web-app-dist:" From 6f732d9c081ba954759b60bb9ee3edc6fa82a8e7 Mon Sep 17 00:00:00 2001 From: David Bieber Date: Tue, 15 Apr 2025 02:12:44 +0000 Subject: [PATCH 3/4] Move chown command to after all repository modifications MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Relocate the ownership change to after all GoNoteGo repository modifications are complete to ensure no files remain owned by root. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/build.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 23c0f2a..d72a43e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -92,9 +92,6 @@ jobs: cd GoNoteGo # Checkout the specific commit git checkout $GITHUB_SHA - - # Change ownership of entire repository to pi user - chown -R pi:pi /home/pi/code/github/dbieber/GoNoteGo echo "Including web app" echo "Checking web app files at /web-app-dist:" @@ -128,6 +125,10 @@ jobs: mkdir /home/pi/secrets echo "Manually transfer secrets to /home/pi/secrets." + + # Change ownership of entire repository to pi user + # Do this after all repository modifications are complete + chown -R pi:pi /home/pi/code/github/dbieber/GoNoteGo echo "Install geckodriver to known location" cd From 080bbf772f0e173f6bdeb77d1803a45b4125564a Mon Sep 17 00:00:00 2001 From: David Bieber Date: Tue, 15 Apr 2025 02:13:05 +0000 Subject: [PATCH 4/4] Simplify repository ownership comment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make the comment more concise and timeless. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d72a43e..72d02a4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -126,8 +126,7 @@ jobs: mkdir /home/pi/secrets echo "Manually transfer secrets to /home/pi/secrets." - # Change ownership of entire repository to pi user - # Do this after all repository modifications are complete + # Ensure repository is owned by pi user instead of root chown -R pi:pi /home/pi/code/github/dbieber/GoNoteGo echo "Install geckodriver to known location"