mirror of
				https://github.com/Pablo2048/modbus-rtu-master.git
				synced 2025-10-31 00:12:42 +01:00 
			
		
		
		
	New way to sync
This commit is contained in:
		
							
								
								
									
										29
									
								
								.github/workflows/sync-main-to-dev.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										29
									
								
								.github/workflows/sync-main-to-dev.yml
									
									
									
									
										vendored
									
									
								
							| @@ -1,29 +1,20 @@ | |||||||
| name: Sync main to development | name: Update Development Branch After PR Merge | ||||||
|  |  | ||||||
| on: | on: | ||||||
|   push: |   pull_request: | ||||||
|     branches: |     types: [closed] | ||||||
|       - main |  | ||||||
|  |  | ||||||
| jobs: | jobs: | ||||||
|   sync: |   update-dev: | ||||||
|  |     if: github.event.pull_request.merged == true && github.ref == 'refs/heads/main' | ||||||
|     runs-on: ubuntu-latest |     runs-on: ubuntu-latest | ||||||
|  |  | ||||||
|     steps: |     steps: | ||||||
|     - name: Checkout repository |     - name: Checkout repository | ||||||
|       uses: actions/checkout@v2 |       uses: actions/checkout@v2 | ||||||
|  |  | ||||||
|     - name: Configure Git |     - name: Set executable permissions | ||||||
|       run: | |       run: chmod +x ./update_dev.sh | ||||||
|         git config user.name "github-actions[bot]" |  | ||||||
|         git config user.email "41898282+github-actions[bot]@users.noreply.github.com" |  | ||||||
|  |  | ||||||
|     - name: Fetch all branches |     - name: Run update_dev.sh script | ||||||
|       run: git fetch --all |       run: ./update_dev.sh | ||||||
|  |  | ||||||
|     - name: Merge main into development |  | ||||||
|       run: | |  | ||||||
|         git checkout development |  | ||||||
|         git merge main |  | ||||||
|  |  | ||||||
|     - name: Push changes to development |  | ||||||
|       run: git push origin development |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user