| 1 | name: Publish Codewhale review |
| 2 | description: Validate and publish a completed Codewhale findings artifact in a separate job without model credentials. |
| 3 | inputs: |
| 4 | findings: |
| 5 | description: Path to findings.json from this workflow run and attempt. |
| 6 | required: true |
| 7 | github-token: |
| 8 | description: GitHub token with contents read and pull-requests write. |
| 9 | default: ${{ github.token }} |
| 10 | pr-number: |
| 11 | description: PR number for workflow_dispatch; pull_request events use the event snapshot. |
| 12 | trigger-phrase: |
| 13 | description: Same bot mention as the analysis job. |
| 14 | default: '@codewhale' |
| 15 | allow-forks: |
| 16 | description: Same trusted-event fork policy as the analysis job. |
| 17 | default: 'false' |
| 18 | reviewer-login: |
| 19 | description: Exact GitHub login used by github-token; only this author's Codewhale markers deduplicate reviews. |
| 20 | default: github-actions[bot] |
| 21 | outputs: |
| 22 | outcome: |
| 23 | description: published, already_published, superseded, not_eligible, configuration_missing, failed, or publication_uncertain. |
| 24 | value: ${{ steps.publish.outputs.outcome }} |
| 25 | receipt: |
| 26 | description: Absolute path to the sanitized JSON publication receipt. |
| 27 | value: ${{ steps.publish.outputs.receipt }} |
| 28 | runs: |
| 29 | using: composite |
| 30 | steps: |
| 31 | - id: publish |
| 32 | shell: bash |
| 33 | env: |
| 34 | CW_ACTION_PATH: ${{ github.action_path }} |
| 35 | CW_FINDINGS: ${{ inputs.findings }} |
| 36 | CW_PR_NUMBER: ${{ inputs.pr-number }} |
| 37 | CW_TRIGGER_PHRASE: ${{ inputs.trigger-phrase }} |
| 38 | CW_ALLOW_FORKS: ${{ inputs.allow-forks }} |
| 39 | CW_REVIEWER_LOGIN: ${{ inputs.reviewer-login }} |
| 40 | GH_TOKEN: ${{ inputs.github-token }} |
| 41 | run: node "$CW_ACTION_PATH/../publish.mjs" |
| 42 |