https://github.com/alvivi/shield-badge
GitHub Action that creates a badge and uploads it to a AWS S3 bucket
https://github.com/alvivi/shield-badge
action actions aws aws-s3 badge badges
Last synced: 2 months ago
JSON representation
GitHub Action that creates a badge and uploads it to a AWS S3 bucket
- Host: GitHub
- URL: https://github.com/alvivi/shield-badge
- Owner: alvivi
- License: mit
- Created: 2020-03-22T09:59:52.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T10:29:56.000Z (over 3 years ago)
- Last Synced: 2024-03-14T17:32:08.347Z (over 2 years ago)
- Topics: action, actions, aws, aws-s3, badge, badges
- Language: TypeScript
- Homepage:
- Size: 2.21 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Shield Badge
[](https://github.com/alvivi/shield-badge/actions)
[](https://github.com/alvivi/shield-badge/actions)
This action creates a [badge](https://shields.io/) and upload it to a
[AWS S3](https://aws.amazon.com/s3/) bucket.
## Usage
### Pre-requisites
Create a workflow `.yml` file in your repositories `.github/workflows`
directory. An [example workflow](#example-workflow) is available below. For more
information, reference the GitHub Help Documentation for
[Creating a workflow file](https://help.github.com/en/articles/configuring-a-workflow#creating-a-workflow-file).
### Inputs
Badge parameters:
* `label` - the text in the badge on the left (**required**).
* `text` - the text in the badge on the right (**required**).
* `color` - the [color](https://github.com/badges/shields/tree/master/gh-badges#colors)
behind the text. A `coverage` color value will set this color based on the
`text` value, being *100* green and *0* red.
* `label-color` - the [color](https://github.com/badges/shields/tree/master/gh-badges#colors) behind the label.
* `format` - the format of the output file (`svg` or `json`).
* `template` - the [template](https://github.com/badges/shields/tree/master/gh-badges/templates) used to create the badge.
AWS parameters:
* `aws-access-key-id` - Amazon Access Key Id.
* `aws-secret-access-key` - Amazon Secret Access Key.
* `aws-region` - The region where the bucket is located.
* `aws-bucket` - The name of the region.
* `aws-filepath` - The file path of the file.
### Example workflow
```yaml
name: Creating Badges
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: alvivi/shield-badge@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: my.region
aws-bucket: my-s3-bucket
aws-filepath: ${{ github.repository }}
label: Custom Badge
text: It's Working!
```
## License
The scripts and documentation in this project are released under the [MIT License](LICENSE)