ci: handle another PR failure case; more debug output
"Skip remaining CI steps" now also handles git log failure, continuing on instead of failing. Getting pretty gnarly.
This commit is contained in:
		
							parent
							
								
									88b1d3f78b
								
							
						
					
					
						commit
						818e098b04
					
				
							
								
								
									
										16
									
								
								.github/workflows/linux.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										16
									
								
								.github/workflows/linux.yml
									
									
									
									
										vendored
									
									
								
							| @ -87,11 +87,11 @@ jobs: | |||||||
|       with:  |       with:  | ||||||
|         fetch-depth: 0         |         fetch-depth: 0         | ||||||
| 
 | 
 | ||||||
|     # - name: Print debug output |     - name: Print debug output | ||||||
|     #   env: |       env: | ||||||
|     #     GITHUB_CONTEXT: ${{ toJson(github) }} |         GITHUB_CONTEXT: ${{ toJson(github) }} | ||||||
|     #   run: | |       run: | | ||||||
|     #     echo |         echo $GITHUB_CONTEXT | ||||||
| 
 | 
 | ||||||
|     #     echo "$GITHUB_SHA" |     #     echo "$GITHUB_SHA" | ||||||
|     #     echo "$GITHUB_REF" |     #     echo "$GITHUB_REF" | ||||||
| @ -114,12 +114,14 @@ 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 commit range, 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 ; | ||||||
|       run: | |       run: | | ||||||
|  |         echo "git log -1 --pretty='%s' ${GITHUB_HEAD_REF:+origin/$GITHUB_HEAD_REF} >> $$.gitlog" | ||||||
|         git log -1 --pretty='%s' ${GITHUB_HEAD_REF:+origin/$GITHUB_HEAD_REF} >> $$.gitlog |         git log -1 --pretty='%s' ${GITHUB_HEAD_REF:+origin/$GITHUB_HEAD_REF} >> $$.gitlog | ||||||
|         grep -qE '^ *;' $$.gitlog || echo "CONTINUE=true" >> $GITHUB_ENV  |           && (grep -qE '^ *;' $$.gitlog || echo "CONTINUE=true" >> $GITHUB_ENV) | ||||||
|  |           || ( echo "could not identify commit range, continuing CI steps") | ||||||
| 
 | 
 | ||||||
|     # things to be cached/restored: |     # things to be cached/restored: | ||||||
| 
 | 
 | ||||||
|  | |||||||
							
								
								
									
										4
									
								
								.github/workflows/mac.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.github/workflows/mac.yml
									
									
									
									
										vendored
									
									
								
							| @ -75,8 +75,10 @@ jobs: | |||||||
| 
 | 
 | ||||||
|     - name: Skip remaining CI steps if latest commit message begins with ; |     - name: Skip remaining CI steps if latest commit message begins with ; | ||||||
|       run: | |       run: | | ||||||
|  |         echo "git log -1 --pretty='%s' ${GITHUB_HEAD_REF:+origin/$GITHUB_HEAD_REF} >> $$.gitlog" | ||||||
|         git log -1 --pretty='%s' ${GITHUB_HEAD_REF:+origin/$GITHUB_HEAD_REF} >> $$.gitlog |         git log -1 --pretty='%s' ${GITHUB_HEAD_REF:+origin/$GITHUB_HEAD_REF} >> $$.gitlog | ||||||
|         grep -qE '^ *;' $$.gitlog || echo "CONTINUE=true" >> $GITHUB_ENV  |           && (grep -qE '^ *;' $$.gitlog || echo "CONTINUE=true" >> $GITHUB_ENV) | ||||||
|  |           || ( echo "could not identify commit range, continuing CI steps") | ||||||
| 
 | 
 | ||||||
|     # things to be cached/restored: |     # things to be cached/restored: | ||||||
| 
 | 
 | ||||||
|  | |||||||
							
								
								
									
										4
									
								
								.github/workflows/push.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.github/workflows/push.yml
									
									
									
									
										vendored
									
									
								
							| @ -86,8 +86,10 @@ jobs: | |||||||
| 
 | 
 | ||||||
|     - name: Skip remaining CI steps if latest commit message begins with ; |     - name: Skip remaining CI steps if latest commit message begins with ; | ||||||
|       run: | |       run: | | ||||||
|  |         echo "git log -1 --pretty='%s' ${GITHUB_HEAD_REF:+origin/$GITHUB_HEAD_REF} >> $$.gitlog" | ||||||
|         git log -1 --pretty='%s' ${GITHUB_HEAD_REF:+origin/$GITHUB_HEAD_REF} >> $$.gitlog |         git log -1 --pretty='%s' ${GITHUB_HEAD_REF:+origin/$GITHUB_HEAD_REF} >> $$.gitlog | ||||||
|         grep -qE '^ *;' $$.gitlog || echo "CONTINUE=true" >> $GITHUB_ENV  |           && (grep -qE '^ *;' $$.gitlog || echo "CONTINUE=true" >> $GITHUB_ENV) | ||||||
|  |           || ( echo "could not identify commit range, continuing CI steps") | ||||||
| 
 | 
 | ||||||
|     # things to be cached/restored: |     # things to be cached/restored: | ||||||
| 
 | 
 | ||||||
|  | |||||||
							
								
								
									
										5
									
								
								.github/workflows/windows.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								.github/workflows/windows.yml
									
									
									
									
										vendored
									
									
								
							| @ -68,10 +68,11 @@ jobs: | |||||||
|           || ( echo "could not identify commits, checking last $NUM instead:"; bin/commitlint -$NUM ) |           || ( 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 |  | ||||||
|       run: | |       run: | | ||||||
|  |         echo "git log -1 --pretty='%s' ${GITHUB_HEAD_REF:+origin/$GITHUB_HEAD_REF} >> $$.gitlog" | ||||||
|         git log -1 --pretty='%s' ${GITHUB_HEAD_REF:+origin/$GITHUB_HEAD_REF} >> $$.gitlog |         git log -1 --pretty='%s' ${GITHUB_HEAD_REF:+origin/$GITHUB_HEAD_REF} >> $$.gitlog | ||||||
|         grep -qE '^ *;' $$.gitlog || echo "CONTINUE=true" >> $GITHUB_ENV  |           && (grep -qE '^ *;' $$.gitlog || echo "CONTINUE=true" >> $GITHUB_ENV) | ||||||
|  |           || ( echo "could not identify commit range, continuing CI steps") | ||||||
| 
 | 
 | ||||||
|     # things to be cached/restored: |     # things to be cached/restored: | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user