mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-30 23:15:57 +01:00
1987c86f3c
Backport #31191 by @TheBrokenRail The example URL given in the documentation leads to a 404. For instance, `https://your-gitea-instance.com/{owner}/{repo}/actions/workflows/{workflow_file}?branch={branch}&event={event}` translates to `https://gitea.thebrokenrail.com/minecraft-pi-reborn/minecraft-pi-reborn/actions/workflows/build.yml`, which is a 404. I had to check the [linked GitHub docs](https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge) to learn that you have to add `/badge.svg` to the URL. Example: https://gitea.thebrokenrail.com/minecraft-pi-reborn/minecraft-pi-reborn/actions/workflows/build.yml/badge.svg Co-authored-by: TheBrokenRail <17478432+TheBrokenRail@users.noreply.github.com>
36 lines
1.1 KiB
Markdown
36 lines
1.1 KiB
Markdown
---
|
|
date: "2023-02-25T00:00:00+00:00"
|
|
title: "Badge"
|
|
slug: "badge"
|
|
sidebar_position: 11
|
|
toc: false
|
|
draft: false
|
|
menu:
|
|
sidebar:
|
|
parent: "actions"
|
|
name: "Badge"
|
|
sidebar_position: 11
|
|
identifier: "Badge"
|
|
---
|
|
|
|
# Badge
|
|
|
|
Gitea has its builtin Badge system which allows you to display the status of your repository in other places. You can use the following badges:
|
|
|
|
## Workflow Badge
|
|
|
|
The Gitea Actions workflow badge is a badge that shows the status of the latest workflow run.
|
|
It is designed to be compatible with [GitHub Actions workflow badge](https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge).
|
|
|
|
You can use the following URL to get the badge:
|
|
|
|
```
|
|
https://your-gitea-instance.com/{owner}/{repo}/actions/workflows/{workflow_file}/badge.svg?branch={branch}&event={event}
|
|
```
|
|
|
|
- `{owner}`: The owner of the repository.
|
|
- `{repo}`: The name of the repository.
|
|
- `{workflow_file}`: The name of the workflow file.
|
|
- `{branch}`: Optional. The branch of the workflow. Default to your repository's default branch.
|
|
- `{event}`: Optional. The event of the workflow. Default to none.
|