Sure, you can use the property " github.event.action" of the github context to fetch the activity type of the repository_dispatch event.
The activity type ( event_type , Required) is a custom webhook event name define in the request body when you run the " Create a repository dispatch event" API. You can set the name as any you like.
When using the API to trigger a workflow on the repository_dispatch event, the data you set in the request body will be passed into the github context of the triggered workflow run. The value of " event_type" will be passed to " github.event.action", and " client_payload" will be copied into the github context as a sub-object of " github.event".
External events: repository_dispatch
Create a repository dispatch event