[CI] Add index page generator. (#23737)
This commit is contained in:
		
							parent
							
								
									cc62eb503d
								
							
						
					
					
						commit
						1b8b6801d4
					
				
					 5 changed files with 269 additions and 6 deletions
				
			
		
							
								
								
									
										24
									
								
								.github/workflows/ci_build_major_branch.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										24
									
								
								.github/workflows/ci_build_major_branch.yml
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -77,44 +77,56 @@ jobs:
 | 
			
		|||
    runs-on: ubuntu-latest
 | 
			
		||||
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Disable safe.directory check
 | 
			
		||||
        run: |
 | 
			
		||||
          git config --global --add safe.directory '*'
 | 
			
		||||
 | 
			
		||||
      - name: Checkout QMK Firmware
 | 
			
		||||
        uses: actions/checkout@v4
 | 
			
		||||
 | 
			
		||||
      - name: Download firmwares
 | 
			
		||||
        uses: actions/download-artifact@v4
 | 
			
		||||
        with:
 | 
			
		||||
          pattern: firmware-*
 | 
			
		||||
          path: firmwares
 | 
			
		||||
          path: .
 | 
			
		||||
          merge-multiple: true
 | 
			
		||||
 | 
			
		||||
      - name: Generate index page
 | 
			
		||||
        run: |
 | 
			
		||||
          python3 -m pip install -r ./util/ci/requirements.txt
 | 
			
		||||
          ./util/ci/index_generator.py > index.html
 | 
			
		||||
 | 
			
		||||
      - name: Upload to https://ci.qmk.fm/${{ inputs.branch || github.ref_name }}/${{ github.sha }}
 | 
			
		||||
        uses: jakejarvis/s3-sync-action@master
 | 
			
		||||
        with:
 | 
			
		||||
          args: --acl public-read --follow-symlinks --delete
 | 
			
		||||
          args: --acl public-read --follow-symlinks --delete --exclude '*' --include 'index.html' --include '*.hex' --include '*.bin' --include '*.uf2'
 | 
			
		||||
        env:
 | 
			
		||||
          AWS_S3_BUCKET: ${{ vars.CI_QMK_FM_SPACES_BUCKET }}
 | 
			
		||||
          AWS_ACCESS_KEY_ID: ${{ secrets.CI_QMK_FM_SPACES_KEY }}
 | 
			
		||||
          AWS_SECRET_ACCESS_KEY: ${{ secrets.CI_QMK_FM_SPACES_SECRET }}
 | 
			
		||||
          AWS_REGION: ${{ vars.CI_QMK_FM_SPACES_REGION }}
 | 
			
		||||
          AWS_S3_ENDPOINT: ${{ vars.CI_QMK_FM_SPACES_ENDPOINT }}
 | 
			
		||||
          SOURCE_DIR: firmwares
 | 
			
		||||
          SOURCE_DIR: .
 | 
			
		||||
          DEST_DIR: ${{ inputs.branch || github.ref_name }}/${{ github.sha }}
 | 
			
		||||
 | 
			
		||||
      - name: Upload to https://ci.qmk.fm/${{ inputs.branch || github.ref_name }}/latest
 | 
			
		||||
        uses: jakejarvis/s3-sync-action@master
 | 
			
		||||
        with:
 | 
			
		||||
          args: --acl public-read --follow-symlinks --delete
 | 
			
		||||
          args: --acl public-read --follow-symlinks --delete --exclude '*' --include 'index.html' --include '*.hex' --include '*.bin' --include '*.uf2'
 | 
			
		||||
        env:
 | 
			
		||||
          AWS_S3_BUCKET: ${{ vars.CI_QMK_FM_SPACES_BUCKET }}
 | 
			
		||||
          AWS_ACCESS_KEY_ID: ${{ secrets.CI_QMK_FM_SPACES_KEY }}
 | 
			
		||||
          AWS_SECRET_ACCESS_KEY: ${{ secrets.CI_QMK_FM_SPACES_SECRET }}
 | 
			
		||||
          AWS_REGION: ${{ vars.CI_QMK_FM_SPACES_REGION }}
 | 
			
		||||
          AWS_S3_ENDPOINT: ${{ vars.CI_QMK_FM_SPACES_ENDPOINT }}
 | 
			
		||||
          SOURCE_DIR: firmwares
 | 
			
		||||
          SOURCE_DIR: .
 | 
			
		||||
          DEST_DIR: ${{ inputs.branch || github.ref_name }}/latest
 | 
			
		||||
 | 
			
		||||
      - name: Check if failure marker file exists
 | 
			
		||||
        id: check_failure_marker
 | 
			
		||||
        uses: andstor/file-existence-action@v3
 | 
			
		||||
        with:
 | 
			
		||||
          files: firmwares/.failed
 | 
			
		||||
          files: ./.failed
 | 
			
		||||
 | 
			
		||||
      - name: Fail build if needed
 | 
			
		||||
        if: steps.check_failure_marker.outputs.files_exists == 'true'
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue