mirror of
				https://github.com/community-scripts/ProxmoxVE.git
				synced 2025-11-04 10:22:50 +00:00 
			
		
		
		
	Update check_and_update_json_date.yml
This commit is contained in:
		@@ -13,7 +13,7 @@ jobs:
 | 
				
			|||||||
      - name: Checkout code
 | 
					      - name: Checkout code
 | 
				
			||||||
        uses: actions/checkout@v4
 | 
					        uses: actions/checkout@v4
 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          ref: ${{ github.head_ref }} 
 | 
					          ref: ${{ github.head_ref }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Set up authentication
 | 
					      - name: Set up authentication
 | 
				
			||||||
        env:
 | 
					        env:
 | 
				
			||||||
@@ -27,8 +27,8 @@ jobs:
 | 
				
			|||||||
      - name: Modify JSON files
 | 
					      - name: Modify JSON files
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
          TODAY=$(date -u +%Y-%m-%d)
 | 
					          TODAY=$(date -u +%Y-%m-%d)
 | 
				
			||||||
          # Filtern der geänderten Dateien im aktuellen PR
 | 
					          # Filtern der geänderten Dateien im aktuellen PR im Vergleich zum Basisbranch
 | 
				
			||||||
          for json_file in $(git diff --name-only origin/main...$GITHUB_SHA | grep '.json$'); do
 | 
					          for json_file in $(git diff --name-only ${{ github.base_ref }}...${{ github.head_ref }} | grep '.json$'); do
 | 
				
			||||||
            if jq -e 'type == "object"' "$json_file" > /dev/null 2>&1; then
 | 
					            if jq -e 'type == "object"' "$json_file" > /dev/null 2>&1; then
 | 
				
			||||||
              jq --arg today "$TODAY" '.date_created = $today' "$json_file" > tmp.json && mv tmp.json "$json_file"
 | 
					              jq --arg today "$TODAY" '.date_created = $today' "$json_file" > tmp.json && mv tmp.json "$json_file"
 | 
				
			||||||
            fi
 | 
					            fi
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user