mirror of
				https://github.com/samply/bridgehead.git
				synced 2025-11-04 02:30:17 +01:00 
			
		
		
		
	test selfdesigned workflow take 1
This commit is contained in:
		
							
								
								
									
										25
									
								
								.github/workflows/auto-pr.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								.github/workflows/auto-pr.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,25 @@
 | 
				
			|||||||
 | 
					name: Automatically generate  Pull Request for test/backport-pilots
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					on:
 | 
				
			||||||
 | 
					  pull_request:
 | 
				
			||||||
 | 
					    types: [closed]
 | 
				
			||||||
 | 
					    branches:
 | 
				
			||||||
 | 
					      - main
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					jobs:
 | 
				
			||||||
 | 
					  create_pr:
 | 
				
			||||||
 | 
					    if: github.event.pull_request.merged == true
 | 
				
			||||||
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					      - name: Checkout repository
 | 
				
			||||||
 | 
					        uses: actions/checkout@v2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: Create Pull Request to test/backport-pilots branch
 | 
				
			||||||
 | 
					        run: |
 | 
				
			||||||
 | 
					          git config --local user.name "github_workflow_verbis_auto-pr"
 | 
				
			||||||
 | 
					          git checkout -b test/backport-pilots
 | 
				
			||||||
 | 
					          git push origin test/backport-pilots
 | 
				
			||||||
 | 
					          gh pr create --base main --head test/backport-pilots --title "Auto PR from main" --body "This PR was created automatically after merging into main."
 | 
				
			||||||
 | 
					        env:
 | 
				
			||||||
 | 
					          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
 | 
				
			||||||
							
								
								
									
										30
									
								
								.github/workflows/backport.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										30
									
								
								.github/workflows/backport.yml
									
									
									
									
										vendored
									
									
								
							@@ -1,30 +0,0 @@
 | 
				
			|||||||
name: Backport to Feature Branch on PR Merge
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
on:
 | 
					 | 
				
			||||||
  pull_request:
 | 
					 | 
				
			||||||
    types: [closed]
 | 
					 | 
				
			||||||
    branches:
 | 
					 | 
				
			||||||
      - test/backport-main
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
jobs:
 | 
					 | 
				
			||||||
  backport:
 | 
					 | 
				
			||||||
    if: github.event.pull_request.merged == true
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
      - name: Checkout the repository
 | 
					 | 
				
			||||||
        uses: actions/checkout@v3
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      - name: Set up Node.js
 | 
					 | 
				
			||||||
        uses: actions/setup-node@v3
 | 
					 | 
				
			||||||
        with:
 | 
					 | 
				
			||||||
          node-version: '20'
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      - name: Backport changes from test/backport-main to test/backport-pilots
 | 
					 | 
				
			||||||
        uses: backport-org/backport-github-action@v1
 | 
					 | 
				
			||||||
        with:
 | 
					 | 
				
			||||||
          github_token: ${{ secrets.GITHUB_TOKEN }}
 | 
					 | 
				
			||||||
          branches: 'test/backport-pilots'  # Specify your feature branch here
 | 
					 | 
				
			||||||
          labels: 'backport'           # Optional: Add a label to the PR
 | 
					 | 
				
			||||||
          assignees: 'PierreDelpy'  # Optional: Assign the PR to yourself or a team member
 | 
					 | 
				
			||||||
          title: 'Automated Backport from test/backport-main to test/backport-pilots'
 | 
					 | 
				
			||||||
          body: 'This PR automatically backports changes from the test/backport-main branch to the test/backport-pilots branch after a PR was merged into main.'
 | 
					 | 
				
			||||||
		Reference in New Issue
	
	Block a user