diff --git a/.gitea/workflows/update-dispatches.yaml b/.gitea/workflows/update-dispatches.yaml index 6d94ccc..1e68be1 100644 --- a/.gitea/workflows/update-dispatches.yaml +++ b/.gitea/workflows/update-dispatches.yaml @@ -25,15 +25,15 @@ jobs: git add dispatches.txt git commit -m "chore: Update Archive Dispatches [skip ci]" || echo "No changes" - # 2. Move the whole workspace to /tmp (Neutral Ground) - # This bypasses the restricted /root/ directory entirely. + # 2. Move to Neutral Ground (/tmp) TEMP_DIR="/tmp/dynasty_sync_$(date +%s)" cp -r . "$TEMP_DIR" chown -R gitea:gitea "$TEMP_DIR" - # 3. Push from the neutral location as the gitea user + # 3. Push with Gitea Environment Variables + # GITEA_CONF is the key that unlocks the 'pre-receive hook' cd "$TEMP_DIR" - sudo -u gitea git push origin main + sudo -u gitea GITEA_CONF=/etc/gitea/app.ini git push origin main # 4. Cleanup rm -rf "$TEMP_DIR" \ No newline at end of file