esafak commented on issue #2507:
URL: https://github.com/apache/fory/issues/2507#issuecomment-3228747324

   It seems apache has tightened security. Would you like to replace the action 
with a script like this?
   ```yaml
   # .github/workflows/sync-folders.yml
   name: sync-folders
   
   on:
     push:
       branches: [main]
       paths:
         - 'src/common/**'
         - 'docs/specs/**'
         - 'lib/utils/**'
   
   jobs:
     sync:
       runs-on: ubuntu-latest
       steps:
         - name: Checkout target repo
           uses: actions/checkout@v4
           with:
             repository: apache/fory-site
             token: ${{ secrets.GITHUB_TOKEN }}
   
         - name: Sync mapped folders
           run: |
             set -euo pipefail
   
             # Map: source-folder destination-folder
             declare -A MAP=(
               ["docs/guide"]="docs/guide"
               ["docs/specification"]="docs/specification"
               ["docs/benchmarks"]="static/img/benchmarks"
             )
   
             MSG="chore: sync folders from apache/fory @ $(date -u 
+%Y-%m-%d_%H:%M:%S)"
             git remote add source https://github.com/apache/fory.git
             git fetch source main --depth=1
   
             for src in "${!MAP[@]}"; do
               dst=${MAP[$src]}
               mkdir -p "$(dirname "$dst")"
               git checkout source/main -- "$src"
               if [[ "$src" != "$dst" ]]; then
                 rsync -a --delete "$src/" "$dst/"
                 rm -rf "$src"
               fi
               git add "$dst"
             done
   
             git diff --cached --quiet && { echo "No changes"; exit 0; }
   
             git config user.name "github-actions[bot]"
             git config user.email 
"github-actions[bot]@users.noreply.github.com"
             git commit -m "$Msg"
             git push
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to