Skip to content

Commit 8d57249

Browse files
committed
feat: display workflow status and automatically download logs
1 parent f25b83f commit 8d57249

4 files changed

Lines changed: 419 additions & 0 deletions

File tree

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# pixi environments
2+
.pixi/*
3+
!.pixi/config.toml
4+
5+
# Rust
6+
/target/
7+
Cargo.lock
8+
9+
# Output files
10+
.gh-ci-tool/*

Cargo.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[package]
2+
name = "gh-ci-tool"
3+
version = "0.1.0"
4+
edition = "2024"
5+
6+
[dependencies]
7+
anyhow = "1"
8+
chrono = "0.4"
9+
clap = { version = "4", features = ["derive"] }
10+
indicatif = "0.17"
11+
octocrab = "0.49"
12+
serde = { version = "1", features = ["derive"] }
13+
serde_json = "1"
14+
tokio = { version = "1", features = ["full"] }
15+
zip = "2"

README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Run
2+
3+
- Set the `GITHUB_TOKEN` environment variable.
4+
- Run `cargo build`, then execute the tool inside a git repository whose CI status you want to check.
5+
6+
# Features
7+
8+
1. Fetches CI status from GitHub Actions.
9+
2. Displays the status of all workflows (success/failure).
10+
3. Saves a detailed report to a local file.
11+
12+
Log locations:
13+
14+
- CI status JSON: `.gh-ci-tool/<commit>/ci-status.json`
15+
- CI status report: `.gh-ci-tool/<commit>/ci-status.txt`
16+
- Failed workflow logs (if any): `.gh-ci-tool/<commit>/logs/<workflow name>-<run id>/`
17+
18+
```console
19+
Current branch: autoupdate-libjxl-v0.11.2
20+
Latest commit: 7f25db0b89eff104d54124cecf597b13966c1c81
21+
Repository: xmake-io/xmake-repo
22+
Fetching current branch workflows...
23+
⠉ [00:00:01] 2/17 Fetching FreeBSD jobs - Windows (arm64) ✔
24+
- macOS (x86_64) ✔
25+
- Linux (arm64) ✔
26+
- iPhoneOS ✔
27+
- macOS (arm64) ✔
28+
- Archlinux ✔
29+
- Wasm (Ubuntu) ❌
30+
- build (ubuntu-latest, shared): Cancelled
31+
- build (ubuntu-latest, static): Failure
32+
- FreeBSD ❌
33+
- build (ubuntu-latest, shared): Cancelled
34+
- build (ubuntu-latest, static): Failure
35+
- Android (Windows) ✔
36+
- MingW (Msys2) ✔
37+
- MingW (MacOS) ✔
38+
- Linux ✔
39+
- Linux (Clang) ✔
40+
- Fedora ✔
41+
- Cross ✔
42+
- Windows ✔
43+
- Android ✔
44+
Logs extracted to .gh-ci-tool\7f25db0b\logs\Wasm-(Ubuntu)-22009069016
45+
Logs extracted to .gh-ci-tool\7f25db0b\logs\FreeBSD-22009069021
46+
```

0 commit comments

Comments
 (0)