• Что бы вступить в ряды "Принятый кодер" Вам нужно:
    Написать 10 полезных сообщений или тем и Получить 10 симпатий.
    Для того кто не хочет терять время,может пожертвовать средства для поддержки сервеса, и вступить в ряды VIP на месяц, дополнительная информация в лс.

  • Пользаватели которые будут спамить, уходят в бан без предупреждения. Спам сообщения определяется администрацией и модератором.

  • Гость, Что бы Вы хотели увидеть на нашем Форуме? Изложить свои идеи и пожелания по улучшению форума Вы можете поделиться с нами здесь. ----> Перейдите сюда
  • Все пользователи не прошедшие проверку электронной почты будут заблокированы. Все вопросы с разблокировкой обращайтесь по адресу электронной почте : info@guardianelinks.com . Не пришло сообщение о проверке или о сбросе также сообщите нам.

Automate Your GitHub README with Custom SVG Metrics and GitHub Actions

Lomanu4 Оффлайн

Lomanu4

Команда форума
Администратор
Регистрация
1 Мар 2015
Сообщения
1,481
Баллы
155
Do you want your GitHub profile to update itself with your latest stats, contributions, and language usage — and actually look good doing it?

This tutorial shows you how to create a fully automated GitHub profile README using

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

with custom SVGs and GitHub Actions.

What You’ll Build

  • A SVG image with your GitHub stats (commits, PRs, languages, etc.)
  • A README.md that displays those stats beautifully
  • A GitHub Action that runs daily, no manual updates
  • Fully customizable layout, colors, and metrics
Step 1: Create Your Profile Repository


If you don’t already have one:

Replace with your GitHub username


git init yourusername
cd yourusername
touch README.md
git remote add origin git@github.com:yourusername/yourusername.git
Step 2: Set Up GitHub Metrics


Go to lowlighter/metrics.

Create a workflow file at .github/workflows/metrics.yml and paste the following:


name: Metrics
on:
schedule: [{cron: "0 0 * * *"}] # Runs daily
workflow_dispatch:

jobs:
github-metrics:
runs-on: ubuntu-latest
steps:
- uses: lowlighter/metrics@latest
with:
filename: general.svg
token: ${{ secrets.METRICS_TOKEN }}
base: header, activity, community, repositories
config_timezone: America/Bogota
plugin_languages: yes
plugin_languages_ignored: html
plugin_lines: yes
plugin_followup: yes

(this is an example of my configuration, adjust it to your city)

Step 3: Create a Personal Access Token

  1. Go to Settings > Developer Settings > Personal Access Tokens > Tokens (classic)
  2. Generate a new token with repo and read:user permissions
  3. Save it as a secret in your profile repo underSettings > Secrets and variables > Actions
  4. Add a new secret with the name: METRICS_TOKEN
Step 4: Embed the SVG in Your README


![Metrics](./general.svg)

Replace yourusername with your actual GitHub handle.

Step 5: Customize Your Metrics


You can change everything: layout, color scheme, plugins, transparency, and more.

Explore the full configuration options here:
?

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.



Some cool plugin ideas:

  • plugin_music(for your Last.fm or Spotify activity)
  • plugin_habits(your GitHub contribution habits)
  • plugin_stargazers(who starred your repos)
Final Result

  • Shows your GitHub activity
  • Looks clean and professional
  • Requires zero maintenance
? Got Questions or Want to Share Yours?


Drop a link to your GitHub profile below ?
Let’s see what your metrics look like!


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

 
Вверх Снизу