mirror of
				https://github.com/eledio-devices/thirdparty-littlefs.git
				synced 2025-10-31 00:32:38 +01:00 
			
		
		
		
	- Added to GitHub statuses (61 results) - Reworked generated release table to include these (16 results, only thumb) These also required a surprisingly large number of other changes: - Bumbed CI Ubuntu version 18.04 -> 20.04, 22.04 is already on the horizon but not usable in GitHub yet - Manualy upgrade to GCC v10, this is required for the -fcallgraph-info flag that scripts/stack.py uses. - Increased paginated status queries to 100 per-page. If we have more statuses than this the status diffs may get much more complicated... - Forced whitespace in generated release table to always be nbsp. GitHub tables get scrunched rather ugly without this, prefering margins to readable tables. - Added limited support for "∞" results, since this is returned by ./scripts/stack.py for recursive functions. As a side-note, this increases the number of statuses reported per-commit from 6 to 61, so hopefully that doesn't cause any problems...
		
			
				
	
	
		
			56 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			56 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
| name: status
 | |
| on:
 | |
|   workflow_run:
 | |
|     workflows: [test]
 | |
|     types: [completed]
 | |
| 
 | |
| jobs:
 | |
|   status:
 | |
|     runs-on: ubuntu-20.04
 | |
|     steps:
 | |
|       # custom statuses?
 | |
|       - uses: dawidd6/action-download-artifact@v2
 | |
|         continue-on-error: true
 | |
|         with:
 | |
|           workflow: ${{github.event.workflow_run.name}}
 | |
|           run_id: ${{github.event.workflow_run.id}}
 | |
|           name: status
 | |
|           path: status
 | |
|       - name: update-status
 | |
|         continue-on-error: true
 | |
|         run: |
 | |
|           ls status
 | |
|           for s in $(shopt -s nullglob ; echo status/*.json)
 | |
|           do
 | |
|             # parse requested status
 | |
|             export STATE="$(jq -er '.state' $s)"
 | |
|             export CONTEXT="$(jq -er '.context' $s)"
 | |
|             export DESCRIPTION="$(jq -er '.description' $s)"
 | |
|             # help lookup URL for job/steps because GitHub makes
 | |
|             # it VERY HARD to link to specific jobs
 | |
|             export TARGET_URL="$(
 | |
|               jq -er '.target_url // empty' $s || (
 | |
|                 export TARGET_JOB="$(jq -er '.target_job' $s)"
 | |
|                 export TARGET_STEP="$(jq -er '.target_step // ""' $s)"
 | |
|                 curl -sS -H "authorization: token ${{secrets.BOT_TOKEN}}" \
 | |
|                   "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/actions/runs/`
 | |
|                     `${{github.event.workflow_run.id}}/jobs" \
 | |
|                   | jq -er '.jobs[]
 | |
|                     | select(.name == env.TARGET_JOB)
 | |
|                     | .html_url
 | |
|                       + "?check_suite_focus=true"
 | |
|                       + ((.steps[]
 | |
|                         | select(.name == env.TARGET_STEP)
 | |
|                         | "#step:\(.number):0") // "")'))"
 | |
|             # update status
 | |
|             curl -sS -X POST -H "authorization: token ${{secrets.BOT_TOKEN}}" \
 | |
|               "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/statuses/`
 | |
|                 `${{github.event.workflow_run.head_sha}}" \
 | |
|               -d "$(jq -n '{
 | |
|                 state: env.STATE,
 | |
|                 context: env.CONTEXT,
 | |
|                 description: env.DESCRIPTION,
 | |
|                 target_url: env.TARGET_URL}' \
 | |
|                 | tee /dev/stderr)"
 | |
|           done
 |