fix: ci: when we can't figure out recent commits, don't check
This commit is contained in:
		
							parent
							
								
									e5678ce230
								
							
						
					
					
						commit
						5f55758ca4
					
				
							
								
								
									
										5
									
								
								.github/workflows/linux.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								.github/workflows/linux.yml
									
									
									
									
										vendored
									
									
								
							| @ -105,7 +105,7 @@ jobs: | |||||||
|       # For a PR, the range will be: master..origin/$GITHUB_HEAD_REF |       # For a PR, the range will be: master..origin/$GITHUB_HEAD_REF | ||||||
|       # For a push it will be: $BEFORE.. |       # For a push it will be: $BEFORE.. | ||||||
|       # For a force push, BEFORE is the previous HEAD, and on github (though not locally) this is an "invalid revision range". |       # For a force push, BEFORE is the previous HEAD, and on github (though not locally) this is an "invalid revision range". | ||||||
|       # In this and any case where the range is invalid, we'll just check the last N commits. |       # In this and any case where the range is invalid, we'll just skip the check, to avoid false positives | ||||||
|       # related: https://stackoverflow.com/questions/64708371/how-to-run-github-workflow-on-every-commit-of-a-push |       # related: https://stackoverflow.com/questions/64708371/how-to-run-github-workflow-on-every-commit-of-a-push | ||||||
|       env: |       env: | ||||||
|         BEFORE: ${{ github.event.before }} |         BEFORE: ${{ github.event.before }} | ||||||
| @ -115,7 +115,8 @@ jobs: | |||||||
|         RANGE=${BEFORE:-origin/master}..${GITHUB_HEAD_REF:+origin/$GITHUB_HEAD_REF} |         RANGE=${BEFORE:-origin/master}..${GITHUB_HEAD_REF:+origin/$GITHUB_HEAD_REF} | ||||||
|         git rev-list --quiet $RANGE \ |         git rev-list --quiet $RANGE \ | ||||||
|           && bin/commitlint  $RANGE \ |           && bin/commitlint  $RANGE \ | ||||||
|           || ( echo "could not identify commit range, checking last $NUM instead:"; bin/commitlint -$NUM ) |           || ( echo "could not identify commits, not checking them" ) | ||||||
|  |       #   || ( echo "could not identify commits, checking last $NUM instead:"; bin/commitlint -$NUM ) | ||||||
| 
 | 
 | ||||||
|     - name: Skip remaining CI steps if latest commit message begins with ; |     - name: Skip remaining CI steps if latest commit message begins with ; | ||||||
|       shell: bash |       shell: bash | ||||||
|  | |||||||
							
								
								
									
										5
									
								
								.github/workflows/mac.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								.github/workflows/mac.yml
									
									
									
									
										vendored
									
									
								
							| @ -62,7 +62,7 @@ jobs: | |||||||
|       # For a PR, the range will be: master..origin/$GITHUB_HEAD_REF |       # For a PR, the range will be: master..origin/$GITHUB_HEAD_REF | ||||||
|       # For a push it will be: $BEFORE.. |       # For a push it will be: $BEFORE.. | ||||||
|       # For a force push, BEFORE is the previous HEAD, and on github (though not locally) this is an "invalid revision range". |       # For a force push, BEFORE is the previous HEAD, and on github (though not locally) this is an "invalid revision range". | ||||||
|       # In this and any case where the range is invalid, we'll just check the last N commits. |       # In this and any case where the range is invalid, we'll just skip the check, to avoid false positives | ||||||
|       # related: https://stackoverflow.com/questions/64708371/how-to-run-github-workflow-on-every-commit-of-a-push |       # related: https://stackoverflow.com/questions/64708371/how-to-run-github-workflow-on-every-commit-of-a-push | ||||||
|       env: |       env: | ||||||
|         BEFORE: ${{ github.event.before }} |         BEFORE: ${{ github.event.before }} | ||||||
| @ -72,7 +72,8 @@ jobs: | |||||||
|         RANGE=${BEFORE:-origin/master}..${GITHUB_HEAD_REF:+origin/$GITHUB_HEAD_REF} |         RANGE=${BEFORE:-origin/master}..${GITHUB_HEAD_REF:+origin/$GITHUB_HEAD_REF} | ||||||
|         git rev-list --quiet $RANGE \ |         git rev-list --quiet $RANGE \ | ||||||
|           && bin/commitlint  $RANGE \ |           && bin/commitlint  $RANGE \ | ||||||
|           || ( echo "could not identify commits, checking last $NUM instead:"; bin/commitlint -$NUM ) |           || ( echo "could not identify commits, not checking them" ) | ||||||
|  |       #   || ( echo "could not identify commits, checking last $NUM instead:"; bin/commitlint -$NUM ) | ||||||
| 
 | 
 | ||||||
|     - name: Skip remaining CI steps if latest commit message begins with ; |     - name: Skip remaining CI steps if latest commit message begins with ; | ||||||
|       shell: bash |       shell: bash | ||||||
|  | |||||||
							
								
								
									
										5
									
								
								.github/workflows/push.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								.github/workflows/push.yml
									
									
									
									
										vendored
									
									
								
							| @ -73,7 +73,7 @@ jobs: | |||||||
|       # For a PR, the range will be: master..origin/$GITHUB_HEAD_REF |       # For a PR, the range will be: master..origin/$GITHUB_HEAD_REF | ||||||
|       # For a push it will be: $BEFORE.. |       # For a push it will be: $BEFORE.. | ||||||
|       # For a force push, BEFORE is the previous HEAD, and on github (though not locally) this is an "invalid revision range". |       # For a force push, BEFORE is the previous HEAD, and on github (though not locally) this is an "invalid revision range". | ||||||
|       # In this and any case where the range is invalid, we'll just check the last N commits. |       # In this and any case where the range is invalid, we'll just skip the check, to avoid false positives | ||||||
|       # related: https://stackoverflow.com/questions/64708371/how-to-run-github-workflow-on-every-commit-of-a-push |       # related: https://stackoverflow.com/questions/64708371/how-to-run-github-workflow-on-every-commit-of-a-push | ||||||
|       env: |       env: | ||||||
|         BEFORE: ${{ github.event.before }} |         BEFORE: ${{ github.event.before }} | ||||||
| @ -83,7 +83,8 @@ jobs: | |||||||
|         RANGE=${BEFORE:-origin/master}..${GITHUB_HEAD_REF:+origin/$GITHUB_HEAD_REF} |         RANGE=${BEFORE:-origin/master}..${GITHUB_HEAD_REF:+origin/$GITHUB_HEAD_REF} | ||||||
|         git rev-list --quiet $RANGE \ |         git rev-list --quiet $RANGE \ | ||||||
|           && bin/commitlint  $RANGE \ |           && bin/commitlint  $RANGE \ | ||||||
|           || ( echo "could not identify commits, checking last $NUM instead:"; bin/commitlint -$NUM ) |           || ( echo "could not identify commits, not checking them" ) | ||||||
|  |       #   || ( echo "could not identify commits, checking last $NUM instead:"; bin/commitlint -$NUM ) | ||||||
| 
 | 
 | ||||||
|     - name: Skip remaining CI steps if latest commit message begins with ; |     - name: Skip remaining CI steps if latest commit message begins with ; | ||||||
|       shell: bash |       shell: bash | ||||||
|  | |||||||
							
								
								
									
										5
									
								
								.github/workflows/windows.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								.github/workflows/windows.yml
									
									
									
									
										vendored
									
									
								
							| @ -55,7 +55,7 @@ jobs: | |||||||
|       # For a PR, the range will be: master..origin/$GITHUB_HEAD_REF |       # For a PR, the range will be: master..origin/$GITHUB_HEAD_REF | ||||||
|       # For a push it will be: $BEFORE.. |       # For a push it will be: $BEFORE.. | ||||||
|       # For a force push, BEFORE is the previous HEAD, and on github (though not locally) this is an "invalid revision range". |       # For a force push, BEFORE is the previous HEAD, and on github (though not locally) this is an "invalid revision range". | ||||||
|       # In this and any case where the range is invalid, we'll just check the last N commits. |       # In this and any case where the range is invalid, we'll just skip the check, to avoid false positives | ||||||
|       # related: https://stackoverflow.com/questions/64708371/how-to-run-github-workflow-on-every-commit-of-a-push |       # related: https://stackoverflow.com/questions/64708371/how-to-run-github-workflow-on-every-commit-of-a-push | ||||||
|       env: |       env: | ||||||
|         BEFORE: ${{ github.event.before }} |         BEFORE: ${{ github.event.before }} | ||||||
| @ -65,7 +65,8 @@ jobs: | |||||||
|         RANGE=${BEFORE:-origin/master}..${GITHUB_HEAD_REF:+origin/$GITHUB_HEAD_REF} |         RANGE=${BEFORE:-origin/master}..${GITHUB_HEAD_REF:+origin/$GITHUB_HEAD_REF} | ||||||
|         git rev-list --quiet $RANGE \ |         git rev-list --quiet $RANGE \ | ||||||
|           && bin/commitlint  $RANGE \ |           && bin/commitlint  $RANGE \ | ||||||
|           || ( echo "could not identify commits, checking last $NUM instead:"; bin/commitlint -$NUM ) |           || ( echo "could not identify commits, not checking them" ) | ||||||
|  |       #   || ( echo "could not identify commits, checking last $NUM instead:"; bin/commitlint -$NUM ) | ||||||
| 
 | 
 | ||||||
|     - name: Skip remaining CI steps if latest commit message begins with ; |     - name: Skip remaining CI steps if latest commit message begins with ; | ||||||
|       shell: bash |       shell: bash | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user