mirror of
				https://github.com/kata-containers/kata-containers.git
				synced 2025-10-30 08:52:39 +00:00 
			
		
		
		
	gha: Cancel previous jobs if a PR is updated
Let's make sure we cancel previous runs, mainly as we have some of those that take a lot of time to run, whenever the PR is updated. This is based on the following stack overflow suggestion: https://stackoverflow.com/questions/66335225/how-to-cancel-previous-runs-in-the-pr-when-you-push-new-commitsupdate-the-curre This is very much needed as we don't want to wait for a long time to have access to a runner because of other runners are still being used performing a task that's meaningless due to the PR update. Fixes: #7298 Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
		
							
								
								
									
										4
									
								
								.github/workflows/PR-wip-checks.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.github/workflows/PR-wip-checks.yaml
									
									
									
									
										vendored
									
									
								
							| @@ -9,6 +9,10 @@ on: | ||||
|       - labeled | ||||
|       - unlabeled | ||||
|  | ||||
| concurrency: | ||||
|   group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||||
|   cancel-in-progress: true | ||||
|  | ||||
| jobs: | ||||
|   pr_wip_check: | ||||
|     runs-on: ubuntu-latest | ||||
|   | ||||
							
								
								
									
										4
									
								
								.github/workflows/add-backport-label.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.github/workflows/add-backport-label.yaml
									
									
									
									
										vendored
									
									
								
							| @@ -10,6 +10,10 @@ on: | ||||
|       - labeled | ||||
|       - unlabeled | ||||
|  | ||||
| concurrency: | ||||
|   group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||||
|   cancel-in-progress: true | ||||
|  | ||||
| jobs: | ||||
|   check-issues: | ||||
|     if: ${{ github.event.label.name != 'auto-backport' }} | ||||
|   | ||||
							
								
								
									
										4
									
								
								.github/workflows/add-issues-to-project.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.github/workflows/add-issues-to-project.yaml
									
									
									
									
										vendored
									
									
								
							| @@ -11,6 +11,10 @@ on: | ||||
|       - opened | ||||
|       - reopened | ||||
|  | ||||
| concurrency: | ||||
|   group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||||
|   cancel-in-progress: true | ||||
|  | ||||
| jobs: | ||||
|   add-new-issues-to-backlog: | ||||
|     runs-on: ubuntu-latest | ||||
|   | ||||
							
								
								
									
										4
									
								
								.github/workflows/add-pr-sizing-label.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.github/workflows/add-pr-sizing-label.yaml
									
									
									
									
										vendored
									
									
								
							| @@ -12,6 +12,10 @@ on: | ||||
|       - reopened | ||||
|       - synchronize | ||||
|  | ||||
| concurrency: | ||||
|   group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||||
|   cancel-in-progress: true | ||||
|  | ||||
| jobs: | ||||
|   add-pr-size-label: | ||||
|     runs-on: ubuntu-latest | ||||
|   | ||||
							
								
								
									
										4
									
								
								.github/workflows/auto-backport.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.github/workflows/auto-backport.yaml
									
									
									
									
										vendored
									
									
								
							| @@ -2,6 +2,10 @@ on: | ||||
|   pull_request_target: | ||||
|     types: ["labeled", "closed"] | ||||
|  | ||||
| concurrency: | ||||
|   group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||||
|   cancel-in-progress: true | ||||
|  | ||||
| jobs: | ||||
|   backport: | ||||
|     name: Backport PR | ||||
|   | ||||
							
								
								
									
										5
									
								
								.github/workflows/cargo-deny-runner.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								.github/workflows/cargo-deny-runner.yaml
									
									
									
									
										vendored
									
									
								
							| @@ -7,6 +7,11 @@ on: | ||||
|       - reopened | ||||
|       - synchronize | ||||
|     paths-ignore: [ '**.md', '**.png', '**.jpg', '**.jpeg', '**.svg', '/docs/**' ] | ||||
|  | ||||
| concurrency: | ||||
|   group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||||
|   cancel-in-progress: true | ||||
|  | ||||
| jobs: | ||||
|   cargo-deny-runner: | ||||
|     runs-on: ubuntu-latest | ||||
|   | ||||
							
								
								
									
										4
									
								
								.github/workflows/ci-nightly.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.github/workflows/ci-nightly.yaml
									
									
									
									
										vendored
									
									
								
							| @@ -3,6 +3,10 @@ on: | ||||
|   schedule: | ||||
|     - cron: '0 0 * * *' | ||||
|  | ||||
| concurrency: | ||||
|   group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||||
|   cancel-in-progress: true | ||||
|  | ||||
| jobs: | ||||
|   kata-containers-ci-on-push: | ||||
|     uses: ./.github/workflows/ci.yaml | ||||
|   | ||||
							
								
								
									
										5
									
								
								.github/workflows/ci-on-push.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								.github/workflows/ci-on-push.yaml
									
									
									
									
										vendored
									
									
								
							| @@ -14,6 +14,11 @@ on: | ||||
|       - labeled | ||||
|     paths-ignore: | ||||
|       - 'docs/**' | ||||
|  | ||||
| concurrency: | ||||
|   group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||||
|   cancel-in-progress: true | ||||
|  | ||||
| jobs: | ||||
|   kata-containers-ci-on-push: | ||||
|     if: ${{ contains(github.event.pull_request.labels.*.name, 'ok-to-test') }} | ||||
|   | ||||
							
								
								
									
										4
									
								
								.github/workflows/commit-message-check.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.github/workflows/commit-message-check.yaml
									
									
									
									
										vendored
									
									
								
							| @@ -6,6 +6,10 @@ on: | ||||
|       - reopened | ||||
|       - synchronize | ||||
|  | ||||
| concurrency: | ||||
|   group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||||
|   cancel-in-progress: true | ||||
|  | ||||
| env: | ||||
|   error_msg: |+ | ||||
|     See the document below for help on formatting commits for the project. | ||||
|   | ||||
							
								
								
									
										5
									
								
								.github/workflows/darwin-tests.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								.github/workflows/darwin-tests.yaml
									
									
									
									
										vendored
									
									
								
							| @@ -6,6 +6,11 @@ on: | ||||
|       - reopened | ||||
|       - synchronize | ||||
|     paths-ignore: [ '**.md', '**.png', '**.jpg', '**.jpeg', '**.svg', '/docs/**' ] | ||||
|  | ||||
| concurrency: | ||||
|   group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||||
|   cancel-in-progress: true | ||||
|  | ||||
| name: Darwin tests | ||||
| jobs: | ||||
|   test: | ||||
|   | ||||
							
								
								
									
										4
									
								
								.github/workflows/payload-after-push.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.github/workflows/payload-after-push.yaml
									
									
									
									
										vendored
									
									
								
							| @@ -5,6 +5,10 @@ on: | ||||
|       - main | ||||
|       - stable-* | ||||
|  | ||||
| concurrency: | ||||
|   group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||||
|   cancel-in-progress: true | ||||
|  | ||||
| jobs: | ||||
|   build-assets-amd64: | ||||
|     uses: ./.github/workflows/build-kata-static-tarball-amd64.yaml | ||||
|   | ||||
							
								
								
									
										4
									
								
								.github/workflows/release.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.github/workflows/release.yaml
									
									
									
									
										vendored
									
									
								
							| @@ -4,6 +4,10 @@ on: | ||||
|     tags: | ||||
|       - '[0-9]+.[0-9]+.[0-9]+*' | ||||
|  | ||||
| concurrency: | ||||
|   group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||||
|   cancel-in-progress: true | ||||
|  | ||||
| jobs: | ||||
|   build-and-push-assets-amd64: | ||||
|     uses: ./.github/workflows/release-amd64.yaml | ||||
|   | ||||
| @@ -15,6 +15,10 @@ on: | ||||
|     branches: | ||||
|       - main | ||||
|  | ||||
| concurrency: | ||||
|   group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||||
|   cancel-in-progress: true | ||||
|  | ||||
| jobs: | ||||
|   check-pr-porting-labels: | ||||
|     runs-on: ubuntu-latest | ||||
|   | ||||
| @@ -7,6 +7,10 @@ on: | ||||
|       - synchronize | ||||
|     paths-ignore: [ '**.md', '**.png', '**.jpg', '**.jpeg', '**.svg', '/docs/**' ] | ||||
|  | ||||
| concurrency: | ||||
|   group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||||
|   cancel-in-progress: true | ||||
|  | ||||
| name: Static checks dragonball | ||||
| jobs: | ||||
|   test-dragonball: | ||||
|   | ||||
							
								
								
									
										4
									
								
								.github/workflows/static-checks.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.github/workflows/static-checks.yaml
									
									
									
									
										vendored
									
									
								
							| @@ -6,6 +6,10 @@ on: | ||||
|       - reopened | ||||
|       - synchronize | ||||
|  | ||||
| concurrency: | ||||
|   group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||||
|   cancel-in-progress: true | ||||
|  | ||||
| name: Static checks | ||||
| jobs: | ||||
|   static-checks: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user