LoginSignup
0
0

GitHub CLI (gh)でGitHub Actionsを確認する

Posted at

Workflowの実行の確認

gh run list

STATUS  TITLE                              WORKFLOW              BRANCH  EVENT  ID          ELAPSED  AGE
✓       yousan is learning GitHub Actions  learn-github-actions  main    push   5540043772  47s      2m
✓       yousan is learning GitHub Actions  learn-github-actions  main    push   5540022138  35s      5m
✓       yousan is learning GitHub Actions  learn-github-actions  main    push   5539971675  44s      12m
✓       yousan is learning GitHub Actions  learn-github-actions  main    push   5539964087  16s      13m
✓       yousan is learning GitHub Actions  learn-github-actions  main    push   5539700582  21s      49m
✓       yousan is learning GitHub Actions  learn-github-actions  main    push   5539691671  17s      50m
✓       yousan is learning GitHub Actions  learn-github-actions  main    push   5539257981  30s      1h
✓       yousan is learning GitHub Actions  learn-github-actions  main    push   5539244761  17s      2h
✓       yousan is learning GitHub Actions  learn-github-actions  main    push   5482836218  19s      6d
X       add actions                        learn-github-actions  main    push   5482833747  0s       6d

最後の実行をブラウザで開く

open $(gh run list --limit 1 --json url --jq '.[0].url')

gh run list --limit 1 --json url --jq '.[0].url' でURLを取得して開く。

最後の実行のログを取得する

実行IDを確定させる必要がある。

実行IDは下記のようにすると取得できる。

gh run list --limit 1 --json 'databaseId' --jq '.[0].databaseId'

これを gh run view に入れる。

gh run view $(gh run list --limit 1 --json 'databaseId' --jq '.[0].databaseId') --log

ただし実行中は見れない。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0