|
1 | 1 | ---
|
| 2 | +name: "CircleCI artifact handling" |
2 | 3 | on: [status]
|
3 |
| -permissions: |
4 |
| - statuses: write |
5 | 4 | jobs:
|
6 | 5 | circleci_artifacts_redirector_job:
|
7 |
| - runs-on: ubuntu-latest |
8 | 6 | if: "${{ github.event.context == 'ci/circleci: docs-python38' }}"
|
| 7 | + permissions: |
| 8 | + statuses: write |
| 9 | + runs-on: ubuntu-latest |
9 | 10 | name: Run CircleCI artifacts redirector
|
10 | 11 | steps:
|
11 | 12 | - name: GitHub Action step
|
|
15 | 16 | artifact-path: 0/doc/build/html/index.html
|
16 | 17 | circleci-jobs: docs-python38
|
17 | 18 | job-title: View the built docs
|
| 19 | + |
| 20 | + post_warnings_as_review: |
| 21 | + if: "${{ github.event.context == 'ci/circleci: docs-python38' }}" |
| 22 | + permissions: |
| 23 | + contents: read |
| 24 | + checks: write |
| 25 | + pull-requests: write |
| 26 | + runs-on: ubuntu-latest |
| 27 | + name: Post warnings/errors as review |
| 28 | + steps: |
| 29 | + - uses: actions/checkout@v3 |
| 30 | + |
| 31 | + - name: Fetch result artifacts |
| 32 | + id: fetch-artifacts |
| 33 | + run: | |
| 34 | + python .circleci/fetch_doc_logs.py "${{ github.event.target_url }}" |
| 35 | +
|
| 36 | + - name: Set up reviewdog |
| 37 | + if: "${{ steps.fetch-artifacts.outputs.count != 0 }}" |
| 38 | + uses: reviewdog/action-setup@v1 |
| 39 | + with: |
| 40 | + reviewdog_version: latest |
| 41 | + |
| 42 | + - name: Post review |
| 43 | + if: "${{ steps.fetch-artifacts.outputs.count != 0 }}" |
| 44 | + env: |
| 45 | + REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 46 | + REVIEWDOG_SKIP_DOGHOUSE: "true" |
| 47 | + CI_COMMIT: ${{ github.event.sha }} |
| 48 | + CI_REPO_OWNER: ${{ github.event.repository.owner.login }} |
| 49 | + CI_REPO_NAME: ${{ github.event.repository.name }} |
| 50 | + run: | |
| 51 | + # The 'status' event does not contain information in the way that |
| 52 | + # reviewdog expects, so we unset those so it reads from the |
| 53 | + # environment variables we set above. |
| 54 | + unset GITHUB_ACTIONS GITHUB_EVENT_PATH |
| 55 | + cat logs/sphinx-errors-warnings.log | \ |
| 56 | + reviewdog \ |
| 57 | + -efm '%f\:%l: %tEBUG: %m' \ |
| 58 | + -efm '%f\:%l: %tNFO: %m' \ |
| 59 | + -efm '%f\:%l: %tARNING: %m' \ |
| 60 | + -efm '%f\:%l: %tRROR: %m' \ |
| 61 | + -efm '%f\:%l: %tEVERE: %m' \ |
| 62 | + -efm '%f\:%s: %tARNING: %m' \ |
| 63 | + -efm '%f\:%s: %tRROR: %m' \ |
| 64 | + -name=sphinx -tee -fail-on-error=false \ |
| 65 | + -reporter=github-check -filter-mode=nofilter |
| 66 | + cat logs/sphinx-deprecations.log | \ |
| 67 | + reviewdog \ |
| 68 | + -efm '%f\:%l: %m' \ |
| 69 | + -name=examples -tee -reporter=github-check -filter-mode=nofilter |
0 commit comments