[skip ci] Use concurrency to cancel duplicate workflow runs
This commit is contained in:
		
							parent
							
								
									4b0c3a8a05
								
							
						
					
					
						commit
						45e9ef7eab
					
				
							
								
								
									
										4
									
								
								.github/workflows/build_pull_request.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.github/workflows/build_pull_request.yml
									
									
									
									
										vendored
									
									
								
							@ -5,6 +5,10 @@ on:
 | 
			
		||||
    paths-ignore:
 | 
			
		||||
      - '**.md'
 | 
			
		||||
 | 
			
		||||
concurrency:
 | 
			
		||||
  group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
 | 
			
		||||
  cancel-in-progress: true
 | 
			
		||||
 | 
			
		||||
env:
 | 
			
		||||
  CI_CHUNK_SIZE: 65
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										10
									
								
								.github/workflows/build_push.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								.github/workflows/build_push.yml
									
									
									
									
										vendored
									
									
								
							@ -7,6 +7,10 @@ on:
 | 
			
		||||
    paths-ignore:
 | 
			
		||||
      - '**.md'
 | 
			
		||||
 | 
			
		||||
concurrency:
 | 
			
		||||
  group: ${{ github.workflow }}
 | 
			
		||||
  cancel-in-progress: true
 | 
			
		||||
 | 
			
		||||
env:
 | 
			
		||||
  CI_CHUNK_SIZE: 65
 | 
			
		||||
 | 
			
		||||
@ -20,12 +24,6 @@ jobs:
 | 
			
		||||
    env:
 | 
			
		||||
      CI_MODULE_GEN: true
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Cancel previous runs
 | 
			
		||||
        uses: styfle/cancel-workflow-action@0.9.1
 | 
			
		||||
        with:
 | 
			
		||||
          access_token: ${{ github.token }}
 | 
			
		||||
          all_but_latest: true
 | 
			
		||||
 | 
			
		||||
      - name: Clone repo
 | 
			
		||||
        uses: actions/checkout@v3
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										16
									
								
								.github/workflows/cancel_pull_request.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										16
									
								
								.github/workflows/cancel_pull_request.yml
									
									
									
									
										vendored
									
									
								
							@ -1,16 +0,0 @@
 | 
			
		||||
name: Cancel old pull request workflows
 | 
			
		||||
 | 
			
		||||
on:
 | 
			
		||||
  workflow_run:
 | 
			
		||||
    workflows: ["PR build check"]
 | 
			
		||||
    types:
 | 
			
		||||
      - requested
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  cancel:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    steps:
 | 
			
		||||
    - uses: styfle/cancel-workflow-action@0.9.1
 | 
			
		||||
      with:
 | 
			
		||||
        workflow_id: ${{ github.event.workflow.id }}
 | 
			
		||||
        all_but_latest: true
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user