File tree Expand file tree Collapse file tree 1 file changed +0
-29
lines changed Expand file tree Collapse file tree 1 file changed +0
-29
lines changed Original file line number Diff line number Diff line change 4646          git config user.email "github-actions[bot]@users.noreply.github.com" 
4747          git commit -m "chore: add VERSION $version" --allow-empty 
4848
49- 
50-        - name : Sync upstream JSONs 
51-         env :
52-           GH_TOKEN : ${{ secrets.GITHUB_TOKEN }} 
53-         run : | 
54-           set -euo pipefail 
55-           tmp_dir=$(mktemp -d) 
56-           api_url="https://api.github.com/repos/community-scripts/ProxmoxVE/contents/frontend/public/json" 
57-           # Fetch file list (no subfolders) 
58-           curl -sSL -H "Authorization: token $GH_TOKEN" "$api_url" \ 
59-             | jq -r '.[] | select(.type=="file") | .name' > "$tmp_dir/files.txt" 
60- 
61-           # Download each file 
62-           while IFS= read -r name; do 
63-             curl -sSL -H "Authorization: token $GH_TOKEN" \ 
64-               "https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/frontend/public/json/$name" \ 
65-               -o "$tmp_dir/$name" 
66-           done < "$tmp_dir/files.txt" 
67- 
68-           mkdir -p json 
69-           rsync -a --delete "$tmp_dir/" json/ 
70- 
71-           # Stage and amend commit to include JSON updates (and VERSION) 
72-           git add json VERSION 
73-           if ! git diff --cached --quiet; then 
74-             git commit --amend --no-edit 
75-           fi 
76- 
77- 
7849       - name : Push changes 
7950        run : | 
8051          git push --force-with-lease --set-upstream origin "update-version-${{ steps.draft.outputs.tag_name }}" 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments