Skip to content

Commit

Permalink
Explain differences between workflow_run and run in existing workflow (
Browse files Browse the repository at this point in the history
  • Loading branch information
corentinmusard authored Jan 4, 2025
1 parent e9b4a58 commit 0cb0c88
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ We provide sample code for popular platforms. If you feel one is missing, please

### On workflow_run event

[workflow_run github documentation](<https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#workflow_run>)

```yaml
on:
workflow_run:
Expand Down Expand Up @@ -66,6 +68,17 @@ jobs:
githubToken: ${{ secrets.GITHUB_TOKEN }}
```
### `On workflow_run event` vs `Inside an existing workflow`

Both methods must be run when the workflow is completed, otherwise, the trace will be incomplete.

| Differences | On workflow_run event | Inside an existing workflow |
| --------------------------------------------------- | --------------------- | --------------------------- |
| Shows in PR page | No | Yes |
| Shows in Actions tab | Yes | Yes |
| Needs extra consideration to be run as the last job | No | Yes |
| Must be duplicated for multiple workflows | No | Yes |

### Private Repository

If you are using a private repository, you need to set the following permissions in your workflow file.
Expand Down

0 comments on commit 0cb0c88

Please sign in to comment.