GitHub主页3D图表显示

 效果如图,项目来源于 yoshi389111/github-profile-3d-contrib: This GitHub Action creates a GitHub contribution calendar on a 3D profile image. 

1. 创建自己的github主页属性项目——跟你github用户名一致即可, 比如我github名字叫FlameskyDexive, 创建一个FlameskyDexive的同名项目,勾选生成ReadMe文件。

2. 开启Action的读写权限,勾选后保存即可:

  - Settings -> Action -> General -> Workflow permissions

  - read and write permissions

3. 创建WorkFlow文件:

  - 项目Action里面点击创建一个WorkFlow文件,名字叫Profile3D

   - 把下面脚本覆盖保存

复制代码
name: GitHub-Profile-3D-Contrib

on:
  schedule: # 03:00 JST == 18:00 UTC
    - cron: "0 18 * * *"
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest
    name: generate-github-profile-3d-contrib
    steps:
      - uses: actions/checkout@v3
      - uses: yoshi389111/github-profile-3d-contrib@0.7.1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          USERNAME: ${{ github.repository_owner }}
      - name: Commit & Push
        run: |
          git config user.name github-actions
          git config user.email github-actions@github.com
          git add -A .
          git commit -m "generated"
          git push
复制代码

环境变量:

  • GITHUB_TOKEN : (必须) 访问 token
  • USERNAME : (必须) 目标用户名
  • MAX_REPOS : (可选) 最大仓库数量, 默认 100 个
  • SETTING_JSON : (可选) 设置 json 的路径. 参考示例-settings/*.json 跟 src/type.ts 在 yoshi389111/github-profile-3d-contrib 仓库查看详情.

4. 进入Action找到刚刚创建好的action文件,选中,点击Run workflow等待执行完成。

 脚本生成的文件放在对应的profile-3d-contrib文件夹,分别是以下几个文件

复制代码
profile-3d-contrib/profile-green-animate.svg
profile-3d-contrib/profile-green.svg
profile-3d-contrib/profile-season-animate.svg
profile-3d-contrib/profile-season.svg
profile-3d-contrib/profile-south-season-animate.svg
profile-3d-contrib/profile-south-season.svg
profile-3d-contrib/profile-night-view.svg
profile-3d-contrib/profile-night-green.svg
profile-3d-contrib/profile-night-rainbow.svg
profile-3d-contrib/profile-gitblock.svg
复制代码

 

5. 修改readme文件内容成以下文本:

profile-3d-contrib/profile-customize.svg

 

posted @   Flamesky  阅读(31)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
历史上的今天:
2023-12-23 Unity最新一键清理Prefab中所有MissingComponent
点击右上角即可分享
微信分享提示