Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

An Action shows timeline of a workflow in a run summary.

License

NotificationsYou must be signed in to change notification settings

Kesin11/actions-timeline

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

An Action shows timeline of a GitHub Action workflow in the run summary page.

actions-timeline is a tool that allows developers to visualize the sequence ofjobs and steps that occur during a GitHub Actions workflow. By examining thetimeline, you can quickly identify any issues or bottlenecks in your workflow,and make adjustments as needed to improve performance and efficiency.

Sample screenshot

USAGE

jobs:build:runs-on:ubuntu-lateststeps:# Register this action before your build step. It will then be executed at the end of the job post-processing.      -uses:Kesin11/actions-timeline@v2with:# e.g.: ${{ secrets.MY_PAT }}# Default: ${{ github.token }}github-token:""# Show waiting runner time in the timeline.# Default: trueshow-waiting-runner:true# Your build steps...

If your workflow has many jobs, you should runactions-timeline in the jobthat takes the most time, or create an independent job foractions-timeline ina last of the workflow.

jobs:build-1:build-2:build-3:actions-timeline:needs:[build-1, build-2, build-3]runs-on:ubuntu-lateststeps:      -uses:Kesin11/actions-timeline@v2

How it works

actions-timeline fetches the jobs and steps of the workflow run from theGitHub API, and then generates a timeline withmermaid gantt diagrams. Thanks tothe GitHub flavored markdown that can visualize mermaid diagrams, the timelineis displayed in the run summary page.

This action is run on post-processing of the job, so you should register thisaction before your build step. If you register this action after your buildstep, the timeline will not include other post-processing steps.

Support GHES

actions-timeline can also work on GitHub Enterprise Server(GHES). It needsGITHUB_API_URL environment variable to access your GHES. Thanks to GitHubActions, it setsdefault environment variablesso you do not need to make any code changes.

Known issues

Important

In some cases, the workflow requires `actions:read' permission.

Sometimes theactions:read' permission is needed in the workflow to fetch workflow jobs and steps. If you see the following error, you need to add theactions:read'permission to your workflow.

jobs:build:permissions:actions:readruns-on:ubuntu-lateststeps:      -uses:Kesin11/actions-timeline@v2

Important

'Waiting for a runner' step is not supported < GHES v3.9

GETworkflow_job API response does not containcreated_at field inGHES v3.8,it is added fromGHES v3.9.So it is not possible to calculate the elapsed time the runner is waiting for ajob,actions-timeline omitsWaiting for a runner step in the timeline.

Similar works

CLI tool

actions-timeline is also available as a CLI tool. You can use it withdeno run command.

deno run --allow-net --allow-write --allow-env=GITHUB_API_URL \  https://raw.githubusercontent.com/Kesin11/actions-timeline/main/cli.ts \  https://github.com/Kesin11/actions-timeline/actions/runs/8021493760/attempts/1 \  -t$(gh auth token) \  -o output.md# Fetch latest attempt if ommit attemptsdeno run --allow-net --allow-write --allow-env=GITHUB_API_URL \  https://raw.githubusercontent.com/Kesin11/actions-timeline/main/cli.ts \  https://github.com/Kesin11/actions-timeline/actions/runs/8021493760/ \  -t$(gh auth token) \  -o output.md# GHESdeno run --allow-net --allow-write --allow-env=GITHUB_API_URL \  https://raw.githubusercontent.com/Kesin11/actions-timeline/main/cli.ts \  https://YOUR_ENTERPRISE_HOST/OWNER/REPO/actions/runs/RUN_ID/attempts/1 \  -t$(gh auth token -h YOUR_ENTERPRISE_HOST) \  -o output.md

cli.ts just outputs the markdown to file or STDOUT, so you have to use othertools to visualize mermaid diagrams.

DEVELOPMENT

Setup

asdf installdeno task setup:githooks

DEBUG

If you want to debug this action, first generatedist/ then execute ownaction.

-uses:actions/checkout@v3-uses:denoland/setup-deno@v1-run:deno task bundle-uses:./

LICENSE

MIT

About

An Action shows timeline of a workflow in a run summary.

Topics

Resources

License

Stars

Watchers

Forks


[8]ページ先頭

©2009-2025 Movatter.jp