Skip to main content

Adding a workflow status badge

You can display a status badge in your repository to indicate the status of your workflows.

참고 항목

GitHub 호스트 실행기는 현재 GitHub Enterprise Server에서 지원되지 않습니다. GitHub public roadmap에 예정된 향후 지원에 대해 자세히 알아볼 수 있습니다.

참고 항목

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 파일이지만 원하는 웹 페이지에 추가할 수도 있습니다. 기본적으로 배지는 기본 분기의 상태를 표시합니다. 기본 분기 워크플로 실행이 없으면 모든 분기에서 가장 최근 실행의 상태가 표시됩니다. URL의 branchevent 쿼리 매개 변수를 사용하여 특정 분기 또는 이벤트에 대한 워크플로 실행의 상태를 표시할 수 있습니다.

워크플로 상태 배지의 스크린샷. 오른쪽에서 왼쪽으로는 GitHub 로고, 워크플로 이름("GitHub Actions 데모") 및 상태("전달")가 표시됩니다.

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 기본 쓰기 및 서식 지정 구문.

Using the UI

You can create a workflow status badge directly on the UI using the workflow file name, branch parameter, and event parameter.

  1. GitHub에서 리포지토리의 기본 페이지로 이동합니다.

  2. 리포지토리 이름 아래에서 작업을 클릭합니다.

    "github/docs" 리포지토리의 탭 스크린샷. "작업" 탭은 주황색 윤곽선으로 강조 표시됩니다.

  3. 왼쪽 사이드바에서 확인할 워크플로를 클릭합니다.

    "작업" 탭의 왼쪽 사이드바 스크린샷. "CodeQL"이라는 워크플로가 진한 주황색 윤곽선으로 표시되어 있습니다.

  4. On the right side of the page, next to the "Filter workflow runs" field, click to display a dropdown menu and click Create status badge.

  5. Optionally, select a branch if you want to display the status badge for a branch different from the default branch.

  6. Optionally, select the event that will trigger the workflow.

  7. Click Copy status badge Markdown.

  8. Copy the Markdown into your README.md file.

Using the workflow file name

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 기본 쓰기 및 서식 지정 구문.

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.

![example workflow](https://github.com/github/docs/actions/workflows/main.yml/badge.svg)

Using the branch parameter

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.

![example branch parameter](https://github.com/github/docs/actions/workflows/main.yml/badge.svg?branch=feature-1)

Using the event parameter

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.

![example event parameter](https://github.com/github/docs/actions/workflows/main.yml/badge.svg?event=push)