Closed afritz1 closed 1 year ago
https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge has the examples
![example workflow](https://github.com/github/docs/actions/workflows/main.yml/badge.svg)
and
![example branch parameter](https://github.com/github/docs/actions/workflows/main.yml/badge.svg?branch=feature-1)
for an example where the owner is github
and the repository name is docs
, so I would guess that you can convert your existing line of
## Current status [![Build Status](https://travis-ci.com/afritz1/OpenTESArena.svg?branch=master)](https://travis-ci.com/afritz1/OpenTESArena)
to
## Current status [![Build Status](https://github.com/afritz1/OpenTESArena/actions/workflows/cmake.yml/badge.svg?branch=main)
I'm not sure what you mean by "The badge link should work in a way that makes sense for forks of the repo.", but I assume the line above would point to the latest build on the main
branch result for your repository, not the result for build of a fork. My fork of OpenTESArena with the current ## Current status [![Build Status](https://travis-ci.com/afritz1/OpenTESArena.svg?branch=master)](https://travis-ci.com/afritz1/OpenTESArena)
line seems to point to the result for your repository, not my fork of it. (By the way, clicking the badge currently will bring you to a "404 Page or file not found" on the Travis CI site)
I played around with it some and I'll probably use this:
[![Build Status](https://github.com/afritz1/OpenTESArena/actions/workflows/cmake.yml/badge.svg?branch=main)](https://github.com/afritz1/OpenTESArena/actions)
The fork part was just me remembering forks in the past had links that could've pointed to their own repo (like putting README.txt
as the link - GitHub would resolve it for that repo), but pointed back to mine instead. I don't think forks can have their own GitHub Actions but I could be wrong.
Thanks for looking this stuff up Allofich!
The
build passing
badge is old and probably isn't pointing to anything useful anymore.Don't remember when I switched to GitHub Actions but there is probably a way to link the badge to the latest
main
branch build result.The badge link should work in a way that makes sense for forks of the repo.