Shielded.dev is a free service that allows you to create custom shields for your projects. This action allows you to update the status of a shield on Shielded.dev from your GitHub Actions workflow.
This action updates a badge on Shielded.dev with the latest status of your project as specified in the action's inputs.
| Build Status | |
| Code Coverage | |
| Code Quality | |
| License | |
| Version | |
| Downloads | |
| Open Issues | |
| Open Pull Requests | |
| Code Size | |
| Contributors | |
| Commit Activity | |
| Release Activity |
name: Update Shield
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Update Shielded.dev Badge
id: shield
uses: shieldeddotdev/shielded-action@v2
with:
shielded-token: ${{ secrets.SHIELDED_TOKEN }}
title: 'Title of the badge'
color: '0011aa'
text: '0 warnings'The action sets shield-url after a successful update:
- run: echo "${{ steps.shield.outputs.shield-url }}"To update or create a shield by key, provide a user token and the shield key:
with:
shielded-token: ${{ secrets.SHIELDED_USER_TOKEN }}
shielded-key: 'build-status'When shielded-token is omitted, the action uses SHIELDED_TOKEN from its environment:
- name: Update Shielded.dev Badge
uses: shieldeddotdev/shielded-action@v2
env:
SHIELDED_TOKEN: ${{ secrets.SHIELDED_TOKEN }}
with:
text: '0 warnings'- shielded-token (Optional) - Your Shielded.dev token. It takes precedence over
SHIELDED_TOKEN. - shielded-key (Optional) - The shield key to send with the update. It can only be used with a user token; omit it when using a shield token. When omitted, the action behaves as it did before.
- endpoint (Optional) - The endpoint to use. Defaults to
https://api.shielded.dev/ - title (Optional) - The title of the badge - omitting this will leave it as-is
- color (Optional) - The color of the badge - omitting this will leave it as-is
- text (Optional) - The text of the badge - omitting this will leave it as-is