Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/CultureHQ/github-actions-badge
A GitHub Actions README badge
https://github.com/CultureHQ/github-actions-badge
lambda readme-badge
Last synced: 3 months ago
JSON representation
A GitHub Actions README badge
- Host: GitHub
- URL: https://github.com/CultureHQ/github-actions-badge
- Owner: CultureHQ
- License: mit
- Archived: true
- Created: 2018-12-19T23:11:26.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-08-19T19:30:09.000Z (about 5 years ago)
- Last Synced: 2024-07-18T08:45:35.924Z (4 months ago)
- Topics: lambda, readme-badge
- Language: JavaScript
- Homepage:
- Size: 133 KB
- Stars: 80
- Watchers: 3
- Forks: 61
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
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](https://img.shields.io/badge/GitHub_Actions-error-red.svg?logo=github&logoColor=white)
- ![Failure](https://img.shields.io/badge/GitHub_Actions-failure-critical.svg?logo=github&logoColor=white)
- ![Pending](https://img.shields.io/badge/GitHub_Actions-pending-yellow.svg?logo=github&logoColor=white)
- ![Success](https://img.shields.io/badge/GitHub_Actions-success-success.svg?logo=github&logoColor=white)
- ![No Runs](https://img.shields.io/badge/GitHub_Actions-no_runs-lightgrey.svg?logo=github&logoColor=white)## Options
You can pass additional options to the badge through the image URL that will be forwarded on to [shields.io](https://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`.```shell
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](https://opensource.org/licenses/MIT).