
GitHub Actions Trigger
CertifiedTrigger a flow when GitHub Actions runs complete
GitHub Actions Trigger
Trigger a flow when GitHub Actions runs complete
Polls a repository at the configured interval and starts one execution when at least one workflow run has completed since the previous evaluation. The state is kept in the namespace KV Store: a watermark (the previous evaluation time on the first poll) and the runs already delivered. Each poll looks back 5 minutes before the watermark, so a run that GitHub lists late or a clock drift cannot make it skip a run, and a run is never delivered twice. On the first poll the watermark is the trigger creation time, so runs that completed up to 5 minutes before the trigger was created are reported as well. A run still in progress at one poll is reported once it completes. Only the latest limit completed runs are scanned. The token needs the actions: read permission.
type: io.kestra.plugin.github.actions.TriggerExamples
Run a flow whenever a workflow fails on the main branch.
id: github_actions_failed_run
namespace: company.team
tasks:
- id: log_failures
type: io.kestra.plugin.core.log.Log
message: "{{ trigger.size }} failed run(s): {{ trigger.runs }}"
triggers:
- id: watch_runs
type: io.kestra.plugin.github.actions.Trigger
oauthToken: "{{ secret('GITHUB_ACCESS_TOKEN') }}"
repository: my-org/my-repo
workflowId: ci.yml
branch: main
conclusion: FAILURE
interval: PT1M
Properties
repository *string
Target repository
Repository in owner/repo format to watch.
allowConcurrent boolean
falseSpecifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.
appInstallationToken string
GitHub App installation token
Installation access token generated by a GitHub App.
branch string
Branch
Only report runs for this branch.
conclusion string
SUCCESSFAILURECANCELLEDSKIPPEDNEUTRALTIMED_OUTACTION_REQUIREDSTALESTARTUP_FAILUREConclusion
Only report runs with this conclusion, for example SUCCESS or FAILURE. All completed runs are reported when unset.
endpoint string
GitHub API endpoint
GitHub or GitHub Enterprise API base URL such as https://api.github.com. Set this when targeting GitHub Enterprise or a non-default API endpoint.
event string
PUSHPULL_REQUESTPULL_REQUEST_TARGETWORKFLOW_DISPATCHWORKFLOW_RUNSCHEDULERELEASEREPOSITORY_DISPATCHISSUESISSUE_COMMENTMERGE_GROUPCREATEDELETEFORKEvent
Only report runs triggered by this event, for example PUSH or WORKFLOW_DISPATCH.
interval string
PT1MdurationInterval between polls
ISO 8601 duration between two evaluations.
jwtToken string
GitHub JWT token
GitHub App JWT used for app-level authentication.
limit integerstring
50Limit
Number of latest completed runs scanned at each poll, between 1 and 100 (default 50).
login string
GitHub login
GitHub login used with oauthToken for authenticated requests.
oauthToken string
GitHub OAuth token
GitHub personal access token used for authenticated requests.
stopAfter array
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTEDList of execution states after which a trigger should be stopped (a.k.a. disabled).
when string
trueA condition that determines whether the trigger should run.
A Pebble expression evaluated at trigger time. The trigger fires only when the expression evaluates to a truthy value (true, a non-empty string, a non-zero number). Use this to gate trigger execution on dynamic runtime values such as execution labels, flow variables, or environment conditions.
workflowId string
Workflow
Only report runs of this workflow, given as its numeric id or its file name such as ci.yml. The filter is applied after fetching, so at most the 500 most recent runs of the repository are examined.
Outputs
runs array
Runs
Completed runs found since the previous evaluation, with id, number, status, conclusion, event, branch, sha, URL and timestamps.
io.kestra.plugin.github.actions.RunSummary
Conclusion
Run conclusion such as success or failure. Only set when the run is completed.
date-timeCreated at
When the run was created.
Event
Event that triggered the run, for example push or workflow_dispatch.
Head branch
Branch the run was executed on.
Head SHA
Commit SHA the run was executed on.
Run URL
URL of the run on GitHub.
Run ID
Id of the workflow run.
Run number
Sequential number of the run within the workflow.
Status
Run status such as queued, in_progress or completed.
date-timeUpdated at
When the run was last updated.
size integer
Size
Number of runs found.