act3

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2024 License: MIT Imports: 3 Imported by: 0

README

act3

✨ Overview

Glance at the results of the last 3 runs of your Github Actions.

Usage

💾 Installation

homebrew:

brew install dhth/tap/act3

go:

go install github.com/dhth/act3@latest

🛠️ Configuration

Access Token

act3 requires an environment variable ACT3_GH_ACCESS_TOKEN which needs to have the following permissions for the repositories that are to be queried for.

  • actions:read
  • checks:read
Configuration file

Create a config file that looks like the following (act3 will look for this file at ~/.config/act3/act3.yml. by default).

workflows:

- id: W_kwDOLkC0eM4FaKV_
  repo: dhth/act3
  name: build
  url: https://asampleurl.com/{{runNumber}}
- id: W_kwDOLkC0eM4FaKWA
  repo: dhth/act3
  name: release
  url: https://asampleurl.com/{{runNumber}}

- id: W_kwDOLb3Pms4FRxjX
  repo: dhth/cueitup
  name: build
  url: https://dhth.github.io/cueitup
- id: W_kwDOLb3Pms4FRxjY
  repo: dhth/cueitup
  name: release
  url: https://dhth.github.io/cueitup

- id: W_kwDOLghtl84FWTlZ
  repo: dhth/ecsv
  name: build
- id: W_kwDOLghtl84FWTla
  repo: dhth/ecsv
  name: release

{{runNumber}} gets replaced with the actual run number of the workflow.

You can find the ID for a workflow as follows:

curl -L \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR_GH_TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  https://api.github.com/repos/<OWNER>/<REPO>/actions/workflows

# or

gh api repos/<OWNER>/<REPO>/actions/workflows

# use node_id from the response

⚡️ Usage

CLI output
act3"
HTML output

act3 can also output the results in HTML format.

act3" \
    -config-file=./examples/html/act3.yml \
    -format=html \
    -html-template-file=./examples/html/template.html

The resultant HTML page looks like this.

Usage

A sample page generated via act3 is running at https://dhth.github.io/act3, the source code for which is in the examples/html directory.

Acknowledgements

act3 is built using the TUI framework bubbletea.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
gh
ui

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL