Skip to content

My Badges

My Badges é um GitHub Action que gera emblemas para seu perfil README.md. Esses emblemas serão atualizados todos os dias automaticamente. E você tirar ganhar novos emblemas conforme seu progresso, ou novos emblemas da comunidade. Sim, você pode adicionar seus próprios emblemas!

ref-reporef-official-docref-dependent-action

Uso

  1. In the repository, create a .github/workflows/ directory.
  2. Add my-badges.yml file with the following content:
yaml
name: my-badges

on:
  workflow_dispatch:
  schedule:
    - cron: '0 0 * * *'

permissions:
  contents: write

jobs:
  my-badges:
    runs-on: ubuntu-latest
    steps:
      - name: Update My Badges
        run: npx update-my-badges ${{github.repository_owner}}
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  1. In your repository, create or edit the README.md file to include:
markdown
## My Badges
<!-- my-badges start -->
<!-- my-badges end -->

Parâmetros

Clique para exibir/fechar os parâmetros

NomeTipoObrigatórioPadrãoDescriçãoMais Observações
ref-actions
env.GITHUB_TOKENstringToken do GitHubO workflow irá utilizar o token padrão que já está em execução.
env.GITHUB_USERstringUsuário do GitHub
env.GITHUB_REPOstring{user/user}Nome do repositório que vai atualizar os emblemas.
datastringCaminho para o JSON que irá gerar os emblemas.Se estiver vazio, os dados necessários serão obtidos da API do GH.
sizenumber64Tamanho do emblemas, em pixels.
dryrunbooleanGera os emblemas, mas pula o envio para o repositório.
pickstringLista de emblemas a serem selecionados.Passe --pick="a-commit,ab-commit,revert-revert-commit" para gerar apenas os itens especificados. Se vazio, busca todos os emblemas.
omitstringLista de emblemas a serem excluídos.Por exemplo, se você não gosta de brilhar seus estrelas: --omit:stars-100,stars-500,stars-1000, até mesmo --omit:stars-*.
compactbooleanRepresenta os emblemas de maior nível no README.md.Por exemplo, se você tiver as conquistas de stars-100 e stars-500, somente a última será mostrada.

Exemplos

markdown
<!-- my-badges start -->
<h4><a href="https://github.com/my-badges/my-badges">My Badges</a></h4>

<a href="my-badges/github-anniversary-10.md"><img src="https://github.com/my-badges/my-badges/blob/master/src/all-badges/github-anniversary/github-anniversary-10.png?raw=true" alt="I joined GitHub 10 years ago." title="I joined GitHub 10 years ago." width="64"></a>
<a href="my-badges/evening-commits.md"><img src="https://github.com/my-badges/my-badges/blob/master/src/all-badges/time-of-commit/evening-commits.png?raw=true" alt="I commit in the evening." title="I commit in the evening." width="64"></a>
<a href="my-badges/my-badges-contributor.md"><img src="https://github.com/my-badges/my-badges/blob/master/src/all-badges/my-badges-contributor/my-badges-contributor.png?raw=true" alt="I contributed to &lt;a href=&quot;https://github.com/my-badges/my-badges&quot;&gt;My Badges&lt;/a&gt;!" title="I contributed to &lt;a href=&quot;https://github.com/my-badges/my-badges&quot;&gt;My Badges&lt;/a&gt;!" width="64"></a>
<a href="my-badges/the-ultimate-question.md"><img src="https://github.com/my-badges/my-badges/blob/master/src/all-badges/the-ultimate-question/the-ultimate-question.png?raw=true" alt="I found the answer to the ultimate question of life, the universe, and everything!" title="I found the answer to the ultimate question of life, the universe, and everything!" width="64"></a>
<a href="my-badges/mass-delete-commit-10k.md"><img src="https://github.com/my-badges/my-badges/blob/master/src/all-badges/mass-delete-commit/mass-delete-commit-10k.png?raw=true" alt="When I delete code, I delete a lot." title="When I delete code, I delete a lot." width="64"></a>
<a href="my-badges/ab-commit.md"><img src="https://github.com/my-badges/my-badges/blob/master/src/all-badges/abc-commit/ab-commit.png?raw=true" alt="One of my commit sha starts with &quot;ab&quot;." title="One of my commit sha starts with &quot;ab&quot;." width="64"></a>
<a href="my-badges/morning-commits.md"><img src="https://github.com/my-badges/my-badges/blob/master/src/all-badges/time-of-commit/morning-commits.png?raw=true" alt="I commit in the morning." title="I commit in the morning." width="64"></a>
<a href="my-badges/old-issue-3.md"><img src="https://github.com/my-badges/my-badges/blob/master/src/all-badges/old-issue/old-issue-3.png?raw=true" alt="I closed an issue that was open for 3 years" title="I closed an issue that was open for 3 years" width="64"></a>
<a href="my-badges/pr-collaboration-10.md"><img src="https://github.com/my-badges/my-badges/blob/master/src/all-badges/pr-collaboration/pr-collaboration-10.png?raw=true" alt="I have participated in pull requests with 10 or more people" title="I have participated in pull requests with 10 or more people" width="64"></a>
<a href="my-badges/fix-5.md"><img src="https://github.com/my-badges/my-badges/blob/master/src/all-badges/fix-commit/fix-5.png?raw=true" alt="I did 5 sequential fixes." title="I did 5 sequential fixes." width="64"></a>
<a href="my-badges/stars-1000.md"><img src="https://github.com/my-badges/my-badges/blob/master/src/all-badges/stars/stars-1000.png?raw=true" alt="I collected 1000 stars." title="I collected 1000 stars." width="64"></a>
<a href="my-badges/dead-commit.md"><img src="https://github.com/my-badges/my-badges/blob/master/src/all-badges/dead-commit/dead-commit.png?raw=true" alt="I pushed a commit with &quot;dead&quot; 4 times." title="I pushed a commit with &quot;dead&quot; 4 times." width="64"></a>
<!-- my-badges end -->

I commit in the evening. I contributed to <a href="https://github.com/my-badges/my-badges">My Badges</a>! I found the answer to the ultimate question of life, the universe, and everything! When I delete code, I delete a lot. One of my commit sha starts with "ab". I commit in the morning. I closed an issue that was open for 3 years I have participated in pull requests with 10 or more people I did 5 sequential fixes. I collected 1000 stars. I pushed a commit with "dead" 4 times.

Readme Widget Hub (v4.3.0) MIT Licensed