Repository navigation
Upload previews #27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Upload previews | |
| on: # zizmor: ignore[dangerous-triggers] -- workflow_run is used safely here; no code checkout occurs | |
| workflow_run: | |
| workflows: [CI] | |
| types: [completed] | |
| permissions: | |
| # smokeshow sets a commit status with the coverage result | |
| statuses: write | |
| jobs: | |
| upload-previews: | |
| if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| # DO NOT run actions/checkout here, for security reasons | |
| # For details, refer to https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ | |
| - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | |
| with: | |
| python-version: '3.12' | |
| - run: pip install smokeshow | |
| - uses: dawidd6/action-download-artifact@eab87c9830c39eff17e5a6eadb20bfb4bc880477 # v27 | |
| with: | |
| workflow: ci.yml | |
| commit: ${{ github.event.workflow_run.head_sha }} | |
| - run: smokeshow upload coverage-html | |
| env: | |
| SMOKESHOW_GITHUB_STATUS_DESCRIPTION: Coverage {coverage-percentage} | |
| SMOKESHOW_GITHUB_COVERAGE_THRESHOLD: 90 | |
| SMOKESHOW_GITHUB_CONTEXT: coverage | |
| SMOKESHOW_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| SMOKESHOW_GITHUB_PR_HEAD_SHA: ${{ github.event.workflow_run.head_sha }} | |
| SMOKESHOW_AUTH_KEY: ${{ secrets.SMOKESHOW_AUTH_KEY }} |