# Unable to set event when running act\_runner exec for local testing

**URL:** <https://forum.gitea.com/t/unable-to-set-event-when-running-act-runner-exec-for-local-testing/9610>\
**Category:** Actions\
**Created:** [August 16, 2024, 10:38pm UTC](https://forum.gitea.com/t/unable-to-set-event-when-running-act-runner-exec-for-local-testing/9610 "2024-08-16T22:38:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![craig](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/craig/32/6177_2.png) [@craig](https://forum.gitea.com/u/craig)\
**Post date:** [August 16, 2024, 10:38pm UTC](https://forum.gitea.com/t/unable-to-set-event-when-running-act-runner-exec-for-local-testing/9610/1 "2024-08-16T22:38:05Z")

</div>

Is there any documentation available for for local running of `act_runner exec` to test workflows?

I can successfully run the workflow locally however I do not understand how to override the event so that I can test tag version processing.

I can run a basic workflow:

```auto
act_runner exec --workflows "./.github/workflows/"

INFO[0000] Using the only detected workflow event: push 
INFO[0000] Planning jobs for event: push                
INFO[0000] cache handler listens on: http://192.168.252.107:33353 
INFO[0000] Start server on http://192.168.252.107:34567 
[Build and Deploy (name)/build_and_deploy] 🚀 Start image=gitea/runner-images:ubuntu-latest
[Build and Deploy (name)/build_and_deploy] 🐳 docker pull image=gitea/runner-images:ubuntu-latest platform= username= forcePull=false
[Build and Deploy (name)/build_and_deploy] Cleaning up network for job build_and_deploy, and network name is: GITEA-ACTIONS-TASK-push_WORKFLOW-Build-and-Deploy-name_JOB-build-and-deploy-build_and_deploy-network
[Build and Deploy (name)/build_and_deploy] 🐳 docker create image=gitea/runner-images:ubuntu-latest platform= entrypoint=["/bin/sleep" "10800"] cmd=[] network="GITEA-ACTIONS-TASK-push_WORKFLOW-Build-and-Deploy-name_JOB-build-and-deploy-build_and_deploy-network"
[Build and Deploy (name)/build_and_deploy] 🐳 docker run image=gitea/runner-images:ubuntu-latest platform= entrypoint=["/bin/sleep" "10800"] cmd=[] network="GITEA-ACTIONS-TASK-push_WORKFLOW-Build-and-Deploy-name_JOB-build-and-deploy-build_and_deploy-network"
[Build and Deploy (name)/build_and_deploy] ⭐ Run Main actions/checkout@v4
[Build and Deploy (name)/build_and_deploy] 🐳 docker cp src=/home/charris/dev/splunk-nas/. dst=/home/charris/dev/splunk-nas
[Build and Deploy (name)/build_and_deploy] ✅ Success - Main actions/checkout@v4
[Build and Deploy (name)/build_and_deploy] ⭐ Run Main dump context
[Build and Deploy (name)/build_and_deploy] 🐳 docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/1.sh] user= workdir=
| {
| repository: {
| default_branch: master
| }
| }
[Build and Deploy (name)/build_and_deploy] ✅ Success - Main dump context
[Build and Deploy (name)/build_and_deploy] ⭐ Run Main package unraid
[Build and Deploy (name)/build_and_deploy] 🐳 docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/2.sh] user= workdir=
[Build and Deploy (name)/build_and_deploy] ✅ Success - Main package unraid
[Build and Deploy (name)/build_and_deploy] Cleaning up container for job build_and_deploy
[Build and Deploy (name)/build_and_deploy] Cleaning up network for job build_and_deploy, and network name is: GITEA-ACTIONS-TASK-push_WORKFLOW-Build-and-Deploy-name_JOB-build-and-deploy-build_and_deploy-network
[Build and Deploy (name)/build_and_deploy] 🏁 Job succeeded

```

I am not sure how to inject a tag into the event:

```auto
act_runner exec --workflows "./.github/workflows/" --event '{"ref": "refs/tags/v1.0.0"}'

INFO[0000] Using chosed event for filtering: {"ref": "refs/tags/v1.0.0"} 
INFO[0000] Planning jobs for event: {"ref": "refs/tags/v1.0.0"} 
INFO[0000] cache handler listens on: http://192.168.252.107:34123 
INFO[0000] Start server on http://192.168.252.107:34567 

```

---

<div class="post-metadata">

**Author:** ![craig](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/craig/32/6177_2.png) [@craig](https://forum.gitea.com/u/craig)\
**Post date:** [August 17, 2024, 4:22am UTC](https://forum.gitea.com/t/unable-to-set-event-when-running-act-runner-exec-for-local-testing/9610/2 "2024-08-17T04:22:01Z")

</div>

I realized that I can use environment variables instead of the context objects in my workflow and during testing I can override the environment variables by providing a file to the act\_runner.
