Skip to the content.

📊 workflow-summary アクション

Workflow の実行結果(成功・失敗)に応じたサマリーレポートを GitHub Actions の Job Summary に出力する複合アクションです。 全 Workflow の終了時 Job で共通的に使用されています。

(ここをクリック)目次

📋 概要

⚙️ Inputs

Input 説明 必須 デフォルト
status Workflow の結果 Status(success / failure -
job-results 各 Job の結果(JSON 形式、複数 Job 時に使用) - ''
project-owner Project の所有者 - ''
project-number 対象 Project の Number - ''

📤 出力内容

共通項目(成功・失敗共通)

項目 内容
Workflow 名 実行された Workflow 名
ブランチ トリガーされた Branch 名
コミット Commit SHA(先頭7文字)
実行者 Workflow を実行したユーザー(プロフィールリンク付き)
実行 URL Actions Run へのリンク
gh バージョン 使用された gh CLI のバージョン
jq バージョン 使用された jq のバージョン
Project Owner Project の所有者(指定時のみ)
Project Number Project の Number(指定時のみ)

Job 結果セクション(job-results 指定時)

job-results に JSON を渡すと、各 Job の名前と結果をテーブル形式で表示します。

失敗時の追加セクション

💡 使用例

① 新規作成 Workflow(project-number なし・複数 Job)

- name: 成功サマリーを出力
  uses: ./.github/actions/workflow-summary
  with:
    status: success
    project-owner: $
    job-results: |
      {"create-project": "$", "extend-project": "$"}

- name: 失敗サマリーを出力
  uses: ./.github/actions/workflow-summary
  with:
    status: failure
    project-owner: $
    job-results: |
      {"create-project": "$", "extend-project": "$"}

②⑥ 既存 Project 操作 Workflow(project-number あり・主処理 Job が1つ)

② GitHub Project 拡張の例:

- name: 成功サマリーを出力
  uses: ./.github/actions/workflow-summary
  with:
    status: success
    project-owner: $
    project-number: $
    job-results: |
      {"extend-project": "$"}

- name: 失敗サマリーを出力
  uses: ./.github/actions/workflow-summary
  with:
    status: failure
    project-owner: $
    project-number: $
    job-results: |
      {"extend-project": "$"}

⑦ Issue/PR 一括紐付けの例:

- name: 成功サマリーを出力
  uses: ./.github/actions/workflow-summary
  with:
    status: success
    project-owner: $
    project-number: $
    job-results: |
      {"add-items": "$"}

- name: 失敗サマリーを出力
  uses: ./.github/actions/workflow-summary
  with:
    status: failure
    project-owner: $
    project-number: $
    job-results: |
      {"add-items": "$"}

③④⑤ Workflow(project-number なし・主処理 Job が1つ)

③ 特殊 Repository 一括作成の例:

- name: 成功サマリーを出力
  uses: ./.github/actions/workflow-summary
  with:
    status: success
    project-owner: $
    job-results: |
      {"create-special-repos": "$"}

- name: 失敗サマリーを出力
  uses: ./.github/actions/workflow-summary
  with:
    status: failure
    project-owner: $
    job-results: |
      {"create-special-repos": "$"}

④ Issue Label 一括作成の例:

- name: 成功サマリーを出力
  uses: ./.github/actions/workflow-summary
  with:
    status: success
    project-owner: $
    job-results: |
      {"setup-repository-labels": "$"}

- name: 失敗サマリーを出力
  uses: ./.github/actions/workflow-summary
  with:
    status: failure
    project-owner: $
    job-results: |
      {"setup-repository-labels": "$"}

⑤ 初期ファイル一括作成の例:

- name: 成功サマリーを出力
  uses: ./.github/actions/workflow-summary
  with:
    status: success
    project-owner: $
    job-results: |
      {"setup-repository-health-files": "$", "setup-repository-scaffold-files": "$"}

- name: 失敗サマリーを出力
  uses: ./.github/actions/workflow-summary
  with:
    status: failure
    project-owner: $
    job-results: |
      {"setup-repository-health-files": "$", "setup-repository-scaffold-files": "$"}

⑧ 統合 Project 分析 Workflow(project-number あり・複数 Job)

- name: 成功サマリーを出力
  uses: ./.github/actions/workflow-summary
  with:
    status: success
    project-owner: $
    project-number: $
    job-results: |
      {"generate-summary-report": "$", "generate-effort-report": "$", "generate-velocity-report": "$", "detect-stale-items": "$", "export-items": "$"}

- name: 失敗サマリーを出力
  uses: ./.github/actions/workflow-summary
  with:
    status: failure
    project-owner: $
    project-number: $
    job-results: |
      {"generate-summary-report": "$", "generate-effort-report": "$", "generate-velocity-report": "$", "detect-stale-items": "$", "export-items": "$"}

🔄 使用 Workflow