mirror of
				https://github.com/Frooodle/Stirling-PDF.git
				synced 2025-10-25 11:17:28 +02:00 
			
		
		
		
	ci(workflows): add concurrency cancellation to CI workflows (#4034)
# Description of Changes - **What was changed** Added a `concurrency` block to all GitHub Actions workflow files (`build.yml`, `check_properties.yml`, `licenses-update.yml`, `push-docker.yml`, `sonarqube.yml`, `swagger.yml`, `sync_files.yml`, `testdriver.yml`) to group jobs by workflow name, event name, and branch, with `cancel-in-progress: true`. - **Why the change was made** To prevent redundant runs of long-running CI jobs on the same branch when new commits or PR updates occur, saving compute resources and reducing queue times. --- ## Checklist ### General - [x] I have read the [Contribution Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md) - [x] I have read the [Stirling-PDF Developer Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md) (if applicable) - [ ] I have read the [How to add new languages to Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md) (if applicable) - [x] I have performed a self-review of my own code - [x] My changes generate no new warnings ### Documentation - [ ] I have updated relevant docs on [Stirling-PDF's doc repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/) (if functionality has heavily changed) - [ ] I have read the section [Add New Translation Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md#add-new-translation-tags) (for new translation tags only) ### UI Changes (if applicable) - [ ] Screenshots or videos demonstrating the UI changes are attached (e.g., as comments or direct attachments in the PR) ### Testing (if applicable) - [ ] I have tested my changes locally. Refer to the [Testing Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md#6-testing) for more details.
This commit is contained in:
		
							parent
							
								
									e3cdf5f729
								
							
						
					
					
						commit
						054bf15b24
					
				
							
								
								
									
										12
									
								
								.github/workflows/build.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										12
									
								
								.github/workflows/build.yml
									
									
									
									
										vendored
									
									
								
							| @ -7,6 +7,18 @@ on: | ||||
|   pull_request: | ||||
|     branches: ["main"] | ||||
| 
 | ||||
| # cancel in-progress jobs if a new job is triggered | ||||
| # This is useful to avoid running multiple builds for the same branch if a new commit is pushed | ||||
| # or a pull request is updated. | ||||
| # It helps to save resources and time by ensuring that only the latest commit is built and tested | ||||
| # This is particularly useful for long-running jobs that may take a while to complete. | ||||
| # The `group` is set to a combination of the workflow name, event name, and branch name. | ||||
| # This ensures that jobs are grouped by the workflow and branch, allowing for cancellation of | ||||
| # in-progress jobs when a new commit is pushed to the same branch or a new pull request is opened. | ||||
| concurrency: | ||||
|   group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref_name || github.ref }} | ||||
|   cancel-in-progress: true | ||||
| 
 | ||||
| permissions: | ||||
|   contents: read | ||||
| 
 | ||||
|  | ||||
							
								
								
									
										12
									
								
								.github/workflows/check_properties.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										12
									
								
								.github/workflows/check_properties.yml
									
									
									
									
										vendored
									
									
								
							| @ -6,6 +6,18 @@ on: | ||||
|     paths: | ||||
|       - "app/core/src/main/resources/messages_*.properties" | ||||
| 
 | ||||
| # cancel in-progress jobs if a new job is triggered | ||||
| # This is useful to avoid running multiple builds for the same branch if a new commit is pushed | ||||
| # or a pull request is updated. | ||||
| # It helps to save resources and time by ensuring that only the latest commit is built and tested | ||||
| # This is particularly useful for long-running jobs that may take a while to complete. | ||||
| # The `group` is set to a combination of the workflow name, event name, and branch name. | ||||
| # This ensures that jobs are grouped by the workflow and branch, allowing for cancellation of | ||||
| # in-progress jobs when a new commit is pushed to the same branch or a new pull request is opened. | ||||
| concurrency: | ||||
|   group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref_name || github.ref }} | ||||
|   cancel-in-progress: true | ||||
| 
 | ||||
| permissions: | ||||
|   contents: read # Allow read access to repository content | ||||
| 
 | ||||
|  | ||||
							
								
								
									
										12
									
								
								.github/workflows/licenses-update.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										12
									
								
								.github/workflows/licenses-update.yml
									
									
									
									
										vendored
									
									
								
							| @ -7,6 +7,18 @@ on: | ||||
|     paths: | ||||
|       - "build.gradle" | ||||
| 
 | ||||
| # cancel in-progress jobs if a new job is triggered | ||||
| # This is useful to avoid running multiple builds for the same branch if a new commit is pushed | ||||
| # or a pull request is updated. | ||||
| # It helps to save resources and time by ensuring that only the latest commit is built and tested | ||||
| # This is particularly useful for long-running jobs that may take a while to complete. | ||||
| # The `group` is set to a combination of the workflow name, event name, and branch name. | ||||
| # This ensures that jobs are grouped by the workflow and branch, allowing for cancellation of | ||||
| # in-progress jobs when a new commit is pushed to the same branch or a new pull request is opened. | ||||
| concurrency: | ||||
|   group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref_name || github.ref }} | ||||
|   cancel-in-progress: true | ||||
| 
 | ||||
| permissions: | ||||
|   contents: read | ||||
| 
 | ||||
|  | ||||
							
								
								
									
										12
									
								
								.github/workflows/push-docker.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										12
									
								
								.github/workflows/push-docker.yml
									
									
									
									
										vendored
									
									
								
							| @ -7,6 +7,18 @@ on: | ||||
|       - master | ||||
|       - main | ||||
| 
 | ||||
| # cancel in-progress jobs if a new job is triggered | ||||
| # This is useful to avoid running multiple builds for the same branch if a new commit is pushed | ||||
| # or a pull request is updated. | ||||
| # It helps to save resources and time by ensuring that only the latest commit is built and tested | ||||
| # This is particularly useful for long-running jobs that may take a while to complete. | ||||
| # The `group` is set to a combination of the workflow name, event name, and branch name. | ||||
| # This ensures that jobs are grouped by the workflow and branch, allowing for cancellation of | ||||
| # in-progress jobs when a new commit is pushed to the same branch or a new pull request is opened. | ||||
| concurrency: | ||||
|   group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref_name || github.ref }} | ||||
|   cancel-in-progress: true | ||||
| 
 | ||||
| permissions: | ||||
|   contents: read | ||||
| 
 | ||||
|  | ||||
							
								
								
									
										12
									
								
								.github/workflows/sonarqube.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										12
									
								
								.github/workflows/sonarqube.yml
									
									
									
									
										vendored
									
									
								
							| @ -9,6 +9,18 @@ on: | ||||
|       - main | ||||
|   workflow_dispatch: | ||||
| 
 | ||||
| # cancel in-progress jobs if a new job is triggered | ||||
| # This is useful to avoid running multiple builds for the same branch if a new commit is pushed | ||||
| # or a pull request is updated. | ||||
| # It helps to save resources and time by ensuring that only the latest commit is built and tested | ||||
| # This is particularly useful for long-running jobs that may take a while to complete. | ||||
| # The `group` is set to a combination of the workflow name, event name, and branch name. | ||||
| # This ensures that jobs are grouped by the workflow and branch, allowing for cancellation of | ||||
| # in-progress jobs when a new commit is pushed to the same branch or a new pull request is opened. | ||||
| concurrency: | ||||
|   group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref_name || github.ref }} | ||||
|   cancel-in-progress: true | ||||
| 
 | ||||
| permissions: | ||||
|   pull-requests: read | ||||
|   actions: read | ||||
|  | ||||
							
								
								
									
										12
									
								
								.github/workflows/swagger.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										12
									
								
								.github/workflows/swagger.yml
									
									
									
									
										vendored
									
									
								
							| @ -6,6 +6,18 @@ on: | ||||
|     branches: | ||||
|       - master | ||||
| 
 | ||||
| # cancel in-progress jobs if a new job is triggered | ||||
| # This is useful to avoid running multiple builds for the same branch if a new commit is pushed | ||||
| # or a pull request is updated. | ||||
| # It helps to save resources and time by ensuring that only the latest commit is built and tested | ||||
| # This is particularly useful for long-running jobs that may take a while to complete. | ||||
| # The `group` is set to a combination of the workflow name, event name, and branch name. | ||||
| # This ensures that jobs are grouped by the workflow and branch, allowing for cancellation of | ||||
| # in-progress jobs when a new commit is pushed to the same branch or a new pull request is opened. | ||||
| concurrency: | ||||
|   group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref_name || github.ref }} | ||||
|   cancel-in-progress: true | ||||
| 
 | ||||
| permissions: | ||||
|   contents: read | ||||
| 
 | ||||
|  | ||||
							
								
								
									
										12
									
								
								.github/workflows/sync_files.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										12
									
								
								.github/workflows/sync_files.yml
									
									
									
									
										vendored
									
									
								
							| @ -12,6 +12,18 @@ on: | ||||
|       - "app/core/src/main/resources/static/3rdPartyLicenses.json" | ||||
|       - "scripts/ignore_translation.toml" | ||||
| 
 | ||||
| # cancel in-progress jobs if a new job is triggered | ||||
| # This is useful to avoid running multiple builds for the same branch if a new commit is pushed | ||||
| # or a pull request is updated. | ||||
| # It helps to save resources and time by ensuring that only the latest commit is built and tested | ||||
| # This is particularly useful for long-running jobs that may take a while to complete. | ||||
| # The `group` is set to a combination of the workflow name, event name, and branch name. | ||||
| # This ensures that jobs are grouped by the workflow and branch, allowing for cancellation of | ||||
| # in-progress jobs when a new commit is pushed to the same branch or a new pull request is opened. | ||||
| concurrency: | ||||
|   group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref_name || github.ref }} | ||||
|   cancel-in-progress: true | ||||
| 
 | ||||
| permissions: | ||||
|   contents: read | ||||
| 
 | ||||
|  | ||||
							
								
								
									
										12
									
								
								.github/workflows/testdriver.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										12
									
								
								.github/workflows/testdriver.yml
									
									
									
									
										vendored
									
									
								
							| @ -4,6 +4,18 @@ on: | ||||
|   push: | ||||
|     branches: ["master", "UITest", "testdriver"] | ||||
| 
 | ||||
| # cancel in-progress jobs if a new job is triggered | ||||
| # This is useful to avoid running multiple builds for the same branch if a new commit is pushed | ||||
| # or a pull request is updated. | ||||
| # It helps to save resources and time by ensuring that only the latest commit is built and tested | ||||
| # This is particularly useful for long-running jobs that may take a while to complete. | ||||
| # The `group` is set to a combination of the workflow name, event name, and branch name. | ||||
| # This ensures that jobs are grouped by the workflow and branch, allowing for cancellation of | ||||
| # in-progress jobs when a new commit is pushed to the same branch or a new pull request is opened. | ||||
| concurrency: | ||||
|   group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref_name || github.ref }} | ||||
|   cancel-in-progress: true | ||||
| 
 | ||||
| permissions: | ||||
|   contents: read | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user