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 inwhere
orjoin
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_runwhere repository_full_name = 'turbot/steampipe';
select *from github_actions_repository_workflow_runwhere 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_branchfrom github_actions_repository_workflow_runwhere repository_full_name = 'turbot/steampipe' and conclusion = 'failure';
select id, event, workflow_id, conclusion, status, run_number, workflow_url, head_commit, head_branchfrom github_actions_repository_workflow_runwhere 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_loginfrom github_actions_repository_workflow_runwhere 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_loginfrom github_actions_repository_workflow_runwhere repository_full_name = 'turbot/steampipe' and event = 'workflow_dispatch';
Schema for github_actions_repository_workflow_run
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
actor | jsonb | The user whom initiated the first instance of this workflow run. | |
actor_login | text | The login of the user whom initiated the first instance of the workflow run. | |
artifacts_url | text | The address for artifact GitHub web page. | |
cancel_url | text | The address for workflow run cancel GitHub web page. | |
check_suite_url | text | The address for the workflow check suite GitHub web page. | |
conclusion | text | = | The conclusion for workflow run. |
created_at | timestamp with time zone | Time when the workflow run was created. | |
event | text | = | The event for which workflow triggered off. |
head_branch | text | = | The head branch of the workflow run branch. |
head_commit | jsonb | The head commit details for workflow run. | |
head_repository | jsonb | The head repository info for the workflow run. | |
head_sha | text | The head sha of the workflow run. | |
html_url | text | The address for the organization's GitHub web page. | |
id | bigint | = | The unque identifier of the workflow run. |
jobs_url | text | The address for the workflow job GitHub web page. | |
login_id | text | =, !=, ~~, ~~*, !~~, !~~* | Unique identifier for the user login. |
logs_url | text | The address for the workflow logs GitHub web page. | |
node_id | text | The node id of the worflow run. | |
pull_requests | jsonb | The pull request details for the workflow run. | |
repository | jsonb | The repository info for the workflow run. | |
repository_full_name | text | = | Full name of the repository that specifies the workflow run. |
rerun_url | text | The address for workflow rerun GitHub web page. | |
run_number | bigint | The number of time workflow has run. | |
run_started_at | timestamp with time zone | Time when the workflow run was started. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
status | text | = | The status of the worflow run. |
triggering_actor | jsonb | The user whom initiated the latest instance of this workflow run. | |
triggering_actor_login | text | The login of the user whom initiated the latest instance of this workflow run. | |
updated_at | timestamp with time zone | Time when the workflow run was updated. | |
url | text | The address for the workflow run GitHub web page. | |
workflow_id | text | The workflow id of the worflow run. | |
workflow_url | text | The 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