preview-link #24
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: preview-link | |
| # Companion to `integration-matrix`. When that workflow finishes on | |
| # a pull request, this one attaches a status check to the source | |
| # commit whose "Details" link goes directly to the dashboard-preview | |
| # artifact (rendered HTML), skipping the artifact summary page. | |
| # | |
| # Must live on the default branch to take effect. | |
| on: | |
| workflow_run: | |
| workflows: ["integration-matrix"] | |
| types: [requested, in_progress, completed] | |
| permissions: {} | |
| jobs: | |
| redirect: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| statuses: write # to attach a status check to the source commit | |
| actions: read # to look up the source workflow's artifact id | |
| steps: | |
| - uses: agriyakhetarpal/github-actions-artifacts-redirector-action@3514efb6f242bd9c0a28ea93564c19a2ad7367d2 # v1.0.2 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| # With `archive: false`, artifact-name is the uploaded file's | |
| # basename without extension (we upload site/index.html). | |
| artifact-name: index | |
| job-title: View dashboard preview |