ノート: GitHubホストランナーは、現在GitHub Enterprise Serverでサポートされていません。 GitHubパブリックロードマップで、計画されている将来のサポートに関する詳しい情報を見ることができます。
Note: Workflow badges in a private repository are not accessible externally, so you won't be able to embed them or link to them from an external site.
ステータスバッジは、ワークフローが現在失敗しているかパスしているかを示します。 ステータスバッジを追加する一般的な場所は、リポジトリのREADME.md
ファイル中ですが、任意の好きなWebページに追加できます。 デフォルトでは、バッジはデフォルトブランチのステータスを示します。 特定のブランチやイベントに対するワークフローの実行のステータスを、URL中のbranch
及びevent
クエリパラメータを使って表示することもできます。
To add a workflow status badge to your README.md
file, first find the URL for the status badge you would like to display. Then you can use Markdown to display the badge as an image in your README.md
file. For more information about image markup in Markdown, see "Basic writing and formatting syntax."
ワークフローファイル名を使用する
You can build the URL for a workflow status badge using the name of the workflow file:
<HOSTNAME>/<OWNER>/<REPOSITORY>/actions/workflows/<WORKFLOW_FILE>/badge.svg
To display the workflow status badge in your README.md
file, use the Markdown markup for embedding images. For more information about image markup in Markdown, see "Basic writing and formatting syntax."
For example, add the following Markdown to your README.md
file to add a status badge for a workflow with the file path .github/workflows/main.yml
. リポジトリの OWNER
は github
Organization で、REPOSITORY
名は docs
です。

branch
パラメータを使用する
To display the status of a workflow run for a specific branch, add ?branch=<BRANCH_NAME>
to the end of the status badge URL.
For example, add the following Markdown to your README.md
file to display a status badge for a branch with the name feature-1
.

event
パラメータを使用する
To display the status of workflow runs triggered by the push
event, add ?event=push
to the end of the status badge URL.
For example, add the following Markdown to your README.md
file to display a badge with the status of workflow runs triggered by the push
event, which will show the status of the build for the current state of that branch.
