Usage guide

To list all workflows for a given event, use -l / --list :

act -l pull_request 

Using event file to provide complete event payload

If your workflow relies on passed event properties, you will have to provide required properties in the event file, example:

To partially simulate pull_request event, you to provide at least head_ref and base_ref . This values can be later accessed via $ >>

< "pull_request": < "head": < "ref": "sample-head-ref" >, "base": < "ref": "sample-base-ref" >> > 

To partially simulate push event with a tag, you need to provide ref which will be accessible via $>

Workflows

By default act will run all workflows in .github/workflows .

You can override that behaviour with -W / --workflows flag by specifying directory containing workflow files

act -W '.github/workflows/' 

This example will run all jobs in all workflows in directory .github/workflows but only if the trigger event is push

or by specifying exact workflow file to run

act -W '.github/workflows/checks.yml' 

This example will run all jobs in .github/workflows/checks.yml workflow file but only if it's trigger event is push

Jobs

By default act will run all jobs in all workflows that are triggerred by push event

act -j 'test' 

This example will run all jobs named test in all workflows that trigger on push event

Configuration file

Act can be configuring using .actrc files. All found arguments will be parsed and appended to a list, in order of: .actrc as per the XDG spec, .actrc in HOME directory, .actrc in invocation directory, cli arguments.

Format: One argument per line, no comments supported.

--container-architecture=linux/amd64 --action-offline-mode 

Vars

To run act with repository variables that are acessible inside the workflow via $>, you can enter them interactively or load them from a file. The following options are available for providing github repository variables:

Secrets

To run act with secrets, you can enter them interactively, supply them as environment variables or load them from a file. The following options are available for providing secrets:

⚠ WARNING ⚠

When inserting sensitive data in your terminal, it might be saved as plain text to history file provided by your shell. To mitigate that, prefix act . command with a space (not all shells respect that) or use secure input (explained below) to insert data.