steampipe plugin install github

Table: github_actions_repository_workflow_run - Query GitHub Actions Repository Workflow Runs using SQL

GitHub Actions is a CI/CD solution that allows you to automate how you build, test, and deploy your projects on any platform, including Linux, macOS, and Windows. It lets you run a series of commands in response to events on GitHub. With GitHub Actions, you can build end-to-end continuous integration (CI) and continuous deployment (CD) capabilities directly in your repository.

Table Usage Guide

The github_actions_repository_workflow_run table provides insights into GitHub Actions Repository Workflow Runs. As a software developer or DevOps engineer, explore details of each workflow run in a repository through this table, including its status, conclusion, and other metadata. Utilize it to monitor and analyze the performance and results of your CI/CD workflows, ensuring your software development process is efficient and effective.

Important Notes

  • You must specify the repository_full_name column in where or join clause to query the table.

Examples

List workflow runs

Analyze the settings to understand the operations and status of the workflow runs in a specific GitHub repository. This can be beneficial in assessing the efficiency and effectiveness of workflows, identifying potential issues, and making informed decisions on workflow optimization.

select
*
from
github_actions_repository_workflow_run
where
repository_full_name = 'turbot/steampipe';
select
*
from
github_actions_repository_workflow_run
where
repository_full_name = 'turbot/steampipe';

List failure workflow runs

Identify instances where workflow runs have failed within the 'turbot/steampipe' repository. This can be useful for debugging and identifying problematic workflows.

select
id,
event,
workflow_id,
conclusion,
status,
run_number,
workflow_url,
head_commit,
head_branch
from
github_actions_repository_workflow_run
where
repository_full_name = 'turbot/steampipe'
and conclusion = 'failure';
select
id,
event,
workflow_id,
conclusion,
status,
run_number,
workflow_url,
head_commit,
head_branch
from
github_actions_repository_workflow_run
where
repository_full_name = 'turbot/steampipe'
and conclusion = 'failure';

List manual workflow runs

This query helps you gain insights into the manually triggered workflow runs in the 'turbot/steampipe' repository. It's particularly useful for tracking and analyzing the performance and results of these workflow runs, allowing you to identify any potential issues or areas for improvement.

select
id,
event,
workflow_id,
conclusion,
status,
run_number,
workflow_url,
head_commit,
head_branch,
actor_login,
triggering_actor_login
from
github_actions_repository_workflow_run
where
repository_full_name = 'turbot/steampipe'
and event = 'workflow_dispatch';
select
id,
event,
workflow_id,
conclusion,
status,
run_number,
workflow_url,
head_commit,
head_branch,
actor_login,
triggering_actor_login
from
github_actions_repository_workflow_run
where
repository_full_name = 'turbot/steampipe'
and event = 'workflow_dispatch';

Schema for github_actions_repository_workflow_run

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
actorjsonbThe user whom initiated the first instance of this workflow run.
actor_logintextThe login of the user whom initiated the first instance of the workflow run.
artifacts_urltextThe address for artifact GitHub web page.
cancel_urltextThe address for workflow run cancel GitHub web page.
check_suite_urltextThe address for the workflow check suite GitHub web page.
conclusiontext=The conclusion for workflow run.
created_attimestamp with time zoneTime when the workflow run was created.
eventtext=The event for which workflow triggered off.
head_branchtext=The head branch of the workflow run branch.
head_commitjsonbThe head commit details for workflow run.
head_repositoryjsonbThe head repository info for the workflow run.
head_shatextThe head sha of the workflow run.
html_urltextThe address for the organization's GitHub web page.
idbigint=The unque identifier of the workflow run.
jobs_urltextThe address for the workflow job GitHub web page.
login_idtext=, !=, ~~, ~~*, !~~, !~~*Unique identifier for the user login.
logs_urltextThe address for the workflow logs GitHub web page.
node_idtextThe node id of the worflow run.
pull_requestsjsonbThe pull request details for the workflow run.
repositoryjsonbThe repository info for the workflow run.
repository_full_nametext=Full name of the repository that specifies the workflow run.
rerun_urltextThe address for workflow rerun GitHub web page.
run_numberbigintThe number of time workflow has run.
run_started_attimestamp with time zoneTime when the workflow run was started.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
statustext=The status of the worflow run.
triggering_actorjsonbThe user whom initiated the latest instance of this workflow run.
triggering_actor_logintextThe login of the user whom initiated the latest instance of this workflow run.
updated_attimestamp with time zoneTime when the workflow run was updated.
urltextThe address for the workflow run GitHub web page.
workflow_idtextThe workflow id of the worflow run.
workflow_urltextThe address for workflow GitHub web page.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- github

You can pass the configuration to the command with the --config argument:

steampipe_export_github --config '<your_config>' github_actions_repository_workflow_run