GithubHelp home page GithubHelp logo

jasonetco / action-badges Goto Github PK

View Code? Open in Web Editor NEW
61.0 6.0 44.0 118 KB

🛡⚡️ A README badge service for GitHub Actions

Home Page: https://action-badges.now.sh

License: MIT License

HCL 3.74% JavaScript 76.52% HTML 19.74%
github actions badges now svg

action-badges's Introduction

This project is deprecated! Badges are now officially part of the GitHub Actions platform!

Action Badges

A README badge service for GitHub Actions

Codecov

Usage

Get a status badge for all GitHub Action runs on the master branch of a repository:

![badge](https://action-badges.now.sh/JasonEtco/example-repo)

Specify an action with the action query parameter:

![badge](https://action-badges.now.sh/JasonEtco/example-repo?action=test)

Note: This service only works for public repositories! It cannot read the status of your private repos.

How it works

When the /:owner/:repo endpoint is requested, the app makes a request to the GitHub API to get the list of check suites created by the GitHub Actions app. It then calculates the status based on the sum conclusion of the check suites and responds with some SVG code (thanks to badgen).

action-badges's People

Contributors

jasonetco avatar jletey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

action-badges's Issues

Status badge shows "build: mixed" even though the workflow was successful

When I visit the URL for the badge for my public repo (https://action-badges.now.sh/xJREB/microservices-runtime-analysis), I see the correct "build: passing" badge. However, on Github in my README (https://github.com/xJREB/microservices-runtime-analysis), I see a different badge with "build: mixed". Any idea what is happening there? Did I inlcude the badge somehow wrongly?

[![Actions Status](https://action-badges.now.sh/xJREB/microservices-runtime-analysis)](https://github.com/xJREB/microservices-runtime-analysis/actions)

Add metrics tracking

There's currently zero tracking for activity. It'd be great to track things like number of requests made to the service in aggregate, just to get a better understanding of how many repos are actually using it.

Add branch selection

Get a status badge for all GitHub Action runs on the master branch of a repository:

It would be great to add the ability to specify the branch to check, e.g. ?branch=foo, like with Travis/Circle CI badges.

Thanks you for a nice tool!

Support querying for a specific workflow

Discovered in #2, there's no way to identify which check suite related to a specific GitHub Actions workflow. I thought that's what the check_name parameter does, but that's actually the check run, which is an individual GitHub Action (an action block in a workflow).

This'd be really useful for projects that have multiple workflows, but only want to show the status of one of them - think a release workflow and a test workflow, the badge only needs to show the status of the latter.

Two options:

  1. I'll ask around internally to see if there's a way to add the workflow name to the check suite object.
  2. Query for the main.workflow file, parse it to get the workflow we care about and the actions it has, then find the check suite whose list of check runs matches the list of actions. This is... hacky, but might work.

Enable for private repos?

What would it take to make this work for private repos? I'm not 100% sure how now.sh stores data on requests, but I know some badge services allow you to pass an api key, would it be possible for us to make that work here too?

![badge](https://action-badges.now.sh/JasonEtco/example-repo?token=$GITHUB_TOKEN)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.