Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: document supported events #29

Merged
merged 2 commits into from
Jan 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,37 @@ This will clear the following cache:
- branch `<branch name>`
- When a branch is deleted, this workflow deletes the cached data associated
with the branch.

## Supported events

> [!IMPORTANT]\
> The branch(ref) to be deleted is determined by the context of the event.\
> Please note that this is not the same as `$GITHUB_REF`(`github.ref`).

| event | branch name format of caches to be deleted |
| :---------------------------- | :----------------------------------------- |
| `check_run` | `<branch name>` |
| `check_suite` | `<branch name>` |
| `create` (branch) | `<branch name>` |
| `create` (tag) | `refs/tags/<tag name>` |
| `delete` (branch) | `<branch name>` |
| `delete` (tag) | `refs/tags/<tag name>` |
| `deployment_status` | `<branch name>` |
| `issue_comment` [^1] | `refs/pull/<number>/merge` |
| `pull_request` [^2] | `refs/pull/<number>/merge` |
| `pull_request_review` | `refs/pull/<number>/merge` |
| `pull_request_review_comment` | `refs/pull/<number>/merge` |
| `pull_request_target` | `refs/pull/<number>/merge` |
| `push` (branch) | `<branch name>` |
| `push` (tag) | `refs/tags/<tag name>` |
| `registry_package` | `refs/tags/<tag name>` |
| `release` | `refs/tags/<tag name>` |
| `workflow_dispatch` (branch) | `<branch name>` |
| `workflow_dispatch` (tag) | `refs/tags/<tag name>` |
| `workflow_run` | `<branch name>` |

[^1]: Only works with pull request comments.
[^2]:
This action doesn't work when triggered by a `pull_request` event if the
pull request is a cross-repository pull request.\
Therefore, it is recommended to use the `pull_request_target` event instead.
Loading