diff --git a/README.md b/README.md index c6ea296..a14c89b 100644 --- a/README.md +++ b/README.md @@ -42,3 +42,37 @@ This will clear the following cache: - branch `` - 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` | `` | +| `check_suite` | `` | +| `create` (branch) | `` | +| `create` (tag) | `refs/tags/` | +| `delete` (branch) | `` | +| `delete` (tag) | `refs/tags/` | +| `deployment_status` | `` | +| `issue_comment` [^1] | `refs/pull//merge` | +| `pull_request` [^2] | `refs/pull//merge` | +| `pull_request_review` | `refs/pull//merge` | +| `pull_request_review_comment` | `refs/pull//merge` | +| `pull_request_target` | `refs/pull//merge` | +| `push` (branch) | `` | +| `push` (tag) | `refs/tags/` | +| `registry_package` | `refs/tags/` | +| `release` | `refs/tags/` | +| `workflow_dispatch` (branch) | `` | +| `workflow_dispatch` (tag) | `refs/tags/` | +| `workflow_run` | `` | + +[^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.