{"id":13573975,"url":"https://github.com/emibcn/badge-action","last_synced_at":"2025-05-08T21:43:23.833Z","repository":{"id":42193069,"uuid":"293290960","full_name":"emibcn/badge-action","owner":"emibcn","description":"Create a badge using GitHub Actions and GitHub Workflow CPU time (no 3rd parties servers)","archived":false,"fork":false,"pushed_at":"2024-03-20T12:24:30.000Z","size":243,"stargazers_count":84,"open_issues_count":0,"forks_count":27,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-25T20:02:42.895Z","etag":null,"topics":["3rd-parties-servers","action","badge","badge-action","badge-generator","badgen","github-actions","github-workflow-cpu","hacktoberfest","javascipt","nodejs","svg-badge"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/badge-action","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/emibcn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-06T14:14:37.000Z","updated_at":"2025-04-21T12:35:27.000Z","dependencies_parsed_at":"2023-11-10T13:25:48.327Z","dependency_job_id":"8e2ed72f-e4dc-41df-a1eb-06d622a87df1","html_url":"https://github.com/emibcn/badge-action","commit_stats":{"total_commits":60,"total_committers":7,"mean_commits":8.571428571428571,"dds":"0.43333333333333335","last_synced_commit":"8e84afe5602f3aab180b169b798852432afbbb62"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emibcn%2Fbadge-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emibcn%2Fbadge-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emibcn%2Fbadge-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emibcn%2Fbadge-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emibcn","download_url":"https://codeload.github.com/emibcn/badge-action/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252741372,"owners_count":21797027,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3rd-parties-servers","action","badge","badge-action","badge-generator","badgen","github-actions","github-workflow-cpu","hacktoberfest","javascipt","nodejs","svg-badge"],"created_at":"2024-08-01T15:00:44.442Z","updated_at":"2025-05-08T21:43:23.783Z","avatar_url":"https://github.com/emibcn.png","language":"Dockerfile","funding_links":[],"categories":["Dockerfile"],"sub_categories":[],"readme":"![.github/workflows/test.yml](https://github.com/emibcn/badge-action/workflows/.github/workflows/test.yml/badge.svg)\n![.github/workflows/test.yml](https://raw.githubusercontent.com/emibcn/badge-action/badges/master/test-badge.svg)\n[![DeepSource](https://deepsource.io/gh/emibcn/badge-action.svg/?label=active+issues\u0026show_trend=true\u0026token=q5_59ceYB1F8e9JRV7HuHuFh)](https://deepsource.io/gh/emibcn/badge-action/?ref=repository-badge)\n\n# Badge action\n\nThis action generates a SVG badge using GitHub Actions and GitHub Workflow CPU time (no 3rd parties servers). The badge is generated using the NPM package [gradient-badge](https://github.com/bokub/gradient-badge) and [Github Badge Action](https://www.npmjs.com/package/github-badge-action) to read and write the GitHub Actions inputs and outputs.\n\n## Inputs\n\n### `label`\n\n**Required** The left label of the badge, usually static.\n\n### `label-color`\n\n**Required** Hex or named color for the label. Default: `555`\n\n### `status`\n\n**Required** The right status as the badge, usually based on results.\n\n### `color`\n\n**Required** An array (comma separated) with hex or named colors of the badge value background. More than one creates gradient background. Default: `blue`.\n\n### `style`\n\n**Required** Badge style: flat or classic. Default: `classic`\n\n### `icon`\n\nUse icon.\n\n### `icon-width`\n\nSet this if icon is not square. Default: `13`\n\n### `scale`\n\nSet badge scale. Default: `1`\n\n### `path`\n\nThe file path to store the badge image file. Only output to `badge` action output if not defined.\n\n## Outputs\n\n### `badge`\n\nThe badge SVG contents.\n\n## Example usage\n\n```\nuses: emibcn/badge-action@v2.0.2\nwith:\n  label: 'Test coverage'\n  status: '53.4%'\n  color: 'blue,555,daf'\n  path: '.github/badges/coverage.svg'\n```\n\n### Commit the changes to dedicated branch\n\nCreate the dedicated branch `badges` with (extracted from [StackOverflow](https://stackoverflow.com/a/11487993/2928168)):\n\n```\ngit checkout master\ngit checkout --orphan badges\n\n# Unstage all the files in your working tree.\ngit rm --cached $(git ls-files)\n\n# Create a dedicated README file, so it's clear what's going on here\necho '# Badges branch' \u003e README.md\ngit add README.md\ngit commit -m 'Add dedicated README'\ngit push origin badges\n```\n\nAnd then, [follow the example](https://github.com/emibcn/badge-action/blob/master/.github/workflows/test.yml#L44).\n\n### Commit the changes to same branch\n\nSee a [workflow example](https://github.com/emibcn/badge-action/blob/master/.github/workflows/test.yml#L60).\nOr another [more complex example](https://github.com/emibcn/pywisp/blob/master/.github/workflows/test.yml#L178).\n\nNote: You will need to pull auto-generated commits with this technique, or your repo will mess up.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femibcn%2Fbadge-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femibcn%2Fbadge-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femibcn%2Fbadge-action/lists"}