Code Monkey home page Code Monkey logo

github-actions-badge's Introduction

DEPRECATED!! Instead of using this repository, you should put the following into your README which is supported directly by GitHub:

[![Actions Status](https://github.com/{owner}/{repo}/workflows/{workflow_name}/badge.svg)](https://github.com/{owner}/{repo}/actions)

github-actions-badge

This is a small AWS lambda that renders a README badge based on the status of your Github Actions workflow. You can add the badge to your README by including:

[![Actions Status](https://xxx.execute-api.us-west-2.amazonaws.com/production/badge/{owner}/{repo})](https://xxx.execute-api.us-west-2.amazonaws.com/production/results/{owner}/{repo})

where {owner} and {repo} are replaced by the github username and the repository name, respectively. For example, this repository would use:

https://xxx.execute-api.us-west-2.amazonaws.com/production/badge/CultureHQ/github-actions-badge

Optionally a branch can be specified using the branch query parameter. Without this parameter, it will use the master branch.

https://xxx.execute-api.us-west-2.amazonaws.com/production/badge/{owner}/{repo}?branch={branch}

The badge variants look like:

  • Error
  • Failure
  • Pending
  • Success
  • No Runs

Options

You can pass additional options to the badge through the image URL that will be forwarded on to shields.io (the source for the images). The options are documented on their page.

For instance, if you wanted to change the style to flat-square, you could pass it as a query param as in:

[![Actions Status](https://xxx.execute-api.us-west-2.amazonaws.com/production/badge/{owner}/{repo}?style=flat-square)](https://xxx.execute-api.us-west-2.amazonaws.com/production/results/{owner}/{repo})

Private repositories

In order for the lambda to get status from Github for private repos, you have to create a token with repo access and set that in .env.yml.

cp .env.yml.example .env.yml

Development

To develop locally, install dependencies with yarn. Then you can run yarn start at the root of the repository to start a local server. To deploy to your AWS environment, run yarn deploy.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/CultureHQ/github-actions-badge.

License

The code is available as open source under the terms of the MIT License.

github-actions-badge's People

Contributors

kddnewton avatar dependabot-preview[bot] avatar woofers avatar caulagi avatar dougnukem avatar franciscop avatar

Watchers

James Cloos avatar Kang Lin avatar

Forkers

kanglin

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.