From 07f761387c54a608313e4a7e5597848c5528e994 Mon Sep 17 00:00:00 2001 From: Jess Hosman <1183847+jhosman@users.noreply.github.com> Date: Fri, 29 Jul 2022 18:11:53 -0600 Subject: [PATCH 1/6] Add updates to all sections --- .../adding-a-workflow-status-badge.md | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/content/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge.md b/content/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge.md index da7ac4443b..60de553f2d 100644 --- a/content/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge.md +++ b/content/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge.md @@ -16,14 +16,19 @@ shortTitle: Add a status badge {% data reusables.repositories.actions-workflow-status-badge-intro %} -You reference the workflow by the name of your workflow file. +## About adding a workflow status badge + +To add a workflow status badge to your `README.md` file, you'll first need to 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 "". + +## Using the workflow file name + +You can reference the workflow status badge using the name of your workflow file. ```markdown ![example workflow]({% ifversion fpt or ghec %}https://github.com{% else %}{% endif %}///actions/workflows//badge.svg) ``` -## Using the workflow file name -This Markdown example adds a status badge for a workflow with the file path `.github/workflows/main.yml`. The `OWNER` of the repository is the `github` organization and the `REPOSITORY` name is `docs`. +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`. The `OWNER` of the repository is the `github` organization and the `REPOSITORY` name is `docs`. ```markdown ![example workflow](https://github.com/github/docs/actions/workflows/main.yml/badge.svg) @@ -31,7 +36,9 @@ This Markdown example adds a status badge for a workflow with the file path `.gi ## Using the `branch` parameter -This Markdown example adds a status badge for a branch with the name `feature-1`. +To display the status of a workflow run for a specific branch, add `?branch=` 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`. ```markdown ![example branch parameter](https://github.com/github/docs/actions/workflows/main.yml/badge.svg?branch=feature-1) @@ -39,7 +46,9 @@ This Markdown example adds a status badge for a branch with the name `feature-1` ## Using the `event` parameter -This Markdown example adds a badge that displays 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. +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. ```markdown ![example event parameter](https://github.com/github/docs/actions/workflows/main.yml/badge.svg?event=push) From fefcc5a25c38076c0249070eb9d7caae3307934d Mon Sep 17 00:00:00 2001 From: Jess Hosman <1183847+jhosman@users.noreply.github.com> Date: Tue, 2 Aug 2022 12:23:14 -0600 Subject: [PATCH 2/6] Add link to article and minor text fix --- .../adding-a-workflow-status-badge.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge.md b/content/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge.md index 60de553f2d..57c1ad77fa 100644 --- a/content/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge.md +++ b/content/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge.md @@ -18,11 +18,11 @@ shortTitle: Add a status badge ## About adding a workflow status badge -To add a workflow status badge to your `README.md` file, you'll first need to 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 "". +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](/github/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#images)." ## Using the workflow file name -You can reference the workflow status badge using the name of your workflow file. +You can reference a workflow status badge using the name of the workflow file: ```markdown ![example workflow]({% ifversion fpt or ghec %}https://github.com{% else %}{% endif %}///actions/workflows//badge.svg) From db8b45d47c2aade42ad53f2ff9dbaa843488f3fa Mon Sep 17 00:00:00 2001 From: Jess Hosman <1183847+jhosman@users.noreply.github.com> Date: Tue, 2 Aug 2022 13:04:57 -0600 Subject: [PATCH 3/6] Fix broken link --- .../adding-a-workflow-status-badge.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge.md b/content/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge.md index 57c1ad77fa..906ff89291 100644 --- a/content/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge.md +++ b/content/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge.md @@ -18,7 +18,7 @@ shortTitle: Add a status badge ## About adding a workflow status badge -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](/github/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#images)." +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](/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#images)." ## Using the workflow file name From a72a415a88ee8003eba8acf24cf0834850f68789 Mon Sep 17 00:00:00 2001 From: Jess Hosman <1183847+jhosman@users.noreply.github.com> Date: Tue, 2 Aug 2022 15:19:50 -0600 Subject: [PATCH 4/6] Add more details in workflow file name section --- .../adding-a-workflow-status-badge.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/content/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge.md b/content/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge.md index 906ff89291..fad588ab5c 100644 --- a/content/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge.md +++ b/content/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge.md @@ -22,11 +22,13 @@ To add a workflow status badge to your `README.md` file, first find the URL for ## Using the workflow file name -You can reference a workflow status badge using the name of the workflow file: +You can find the URL for a workflow status badge using the name of the workflow file: -```markdown -![example workflow]({% ifversion fpt or ghec %}https://github.com{% else %}{% endif %}///actions/workflows//badge.svg) ``` +{% ifversion fpt or ghec %}https://github.com{% else %}{% endif %}///actions/workflows//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](/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#images)." 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`. The `OWNER` of the repository is the `github` organization and the `REPOSITORY` name is `docs`. From a2cafb4223eace9cac06cae6d8e2c912a396dfa4 Mon Sep 17 00:00:00 2001 From: Jess Hosman <1183847+jhosman@users.noreply.github.com> Date: Wed, 3 Aug 2022 11:51:37 -0600 Subject: [PATCH 5/6] Remove About header Co-authored-by: Steve Guntrip <12534592+stevecat@users.noreply.github.com> --- .../adding-a-workflow-status-badge.md | 1 - 1 file changed, 1 deletion(-) diff --git a/content/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge.md b/content/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge.md index fad588ab5c..a284a28af0 100644 --- a/content/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge.md +++ b/content/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge.md @@ -16,7 +16,6 @@ shortTitle: Add a status badge {% data reusables.repositories.actions-workflow-status-badge-intro %} -## About adding a workflow status badge 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](/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#images)." From 9330989bc9673668d76aad459905bdafef3f9083 Mon Sep 17 00:00:00 2001 From: Jess Hosman <1183847+jhosman@users.noreply.github.com> Date: Wed, 3 Aug 2022 11:52:10 -0600 Subject: [PATCH 6/6] Change find to build Co-authored-by: Steve Guntrip <12534592+stevecat@users.noreply.github.com> --- .../adding-a-workflow-status-badge.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge.md b/content/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge.md index a284a28af0..b56facb9e9 100644 --- a/content/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge.md +++ b/content/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge.md @@ -21,7 +21,7 @@ To add a workflow status badge to your `README.md` file, first find the URL for ## Using the workflow file name -You can find the URL for a workflow status badge using the name of the workflow file: +You can build the URL for a workflow status badge using the name of the workflow file: ``` {% ifversion fpt or ghec %}https://github.com{% else %}{% endif %}///actions/workflows//badge.svg