Update update_json_date.yml
This commit is contained in:
		
							parent
							
								
									c40fc2b159
								
							
						
					
					
						commit
						a51e688388
					
				
							
								
								
									
										12
									
								
								.github/workflows/update_json_date.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										12
									
								
								.github/workflows/update_json_date.yml
									
									
									
									
										vendored
									
									
								
							| @ -38,9 +38,15 @@ jobs: | ||||
|             BRANCH_NAME=$(gh pr view $PR_NUMBER --json headRefName --jq '.headRefName') | ||||
|             REPO_NAME="${{ github.repository }}" | ||||
| 
 | ||||
|             # Prüfen, ob der Branch remote existiert | ||||
|             if ! git ls-remote --exit-code origin "$BRANCH_NAME"; then | ||||
|               echo "Branch $BRANCH_NAME für PR #$PR_NUMBER existiert nicht, überspringe..." | ||||
|               continue | ||||
|             fi | ||||
| 
 | ||||
|             # Checkout PR Branch | ||||
|             git fetch origin $BRANCH_NAME | ||||
|             git checkout $BRANCH_NAME | ||||
|             git fetch origin "$BRANCH_NAME" | ||||
|             git checkout -B "$BRANCH_NAME" "origin/$BRANCH_NAME" | ||||
| 
 | ||||
|             # Get newly added JSON files | ||||
|             NEW_JSON_FILES=$(gh api repos/$REPO_NAME/pulls/$PR_NUMBER/files --jq '.[] | select(.status == "added") | .filename' | grep '^json/.*\.json$' || true) | ||||
| @ -66,7 +72,7 @@ jobs: | ||||
|               git config --global user.name "github-actions[bot]" | ||||
|               git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||||
|               git commit -am "Update date_created in new JSON files" | ||||
|               git push origin $BRANCH_NAME | ||||
|               git push origin "$BRANCH_NAME" | ||||
|             else | ||||
|               echo "No updates needed for PR #$PR_NUMBER" | ||||
|             fi | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 CanbiZ
						CanbiZ