二丫讲梵 二丫讲梵
首页
  • 最佳实践
  • 迎刃而解
  • Nginx
  • Php
  • Zabbix
  • Prometheus
  • Grafana
  • CentOS
  • Systemd
  • Docker
  • Rancker
  • Ansible
  • Ldap
  • Gitlab
  • GitHub
  • Etcd
  • Consul
  • RabbitMQ
  • Kafka
  • MySql
  • MongoDB
  • OpenVPN
  • KVM
  • VMware
  • Other
  • ELK
  • K8S
  • Nexus
  • Jenkins
  • 随写编年
  • 家人物语
  • 追忆青春
  • 父亲的朋友圈
  • 电影音乐
  • 效率工具
  • 博客相关
  • Shell
  • 前端实践
  • Vue学习笔记
  • Golang学习笔记
  • Golang编程技巧
  • 学习周刊
  • Obsidian插件周刊
关于
友链
推广
  • 本站索引

    • 分类
    • 标签
    • 归档
  • 本站页面

    • 导航
    • 打赏
  • 我的工具

    • 备忘录清单 (opens new window)
    • 网站状态 (opens new window)
    • json2go (opens new window)
    • 微信MD编辑 (opens new window)
    • 国内镜像 (opens new window)
    • 出口IP查询 (opens new window)
    • 代码高亮工具 (opens new window)
  • 外站页面

    • 开往 (opens new window)
    • ldapdoc (opens new window)
    • HowToStartOpenSource (opens new window)
    • vdoing-template (opens new window)
GitHub (opens new window)

二丫讲梵

行者常至,为者常成
首页
  • 最佳实践
  • 迎刃而解
  • Nginx
  • Php
  • Zabbix
  • Prometheus
  • Grafana
  • CentOS
  • Systemd
  • Docker
  • Rancker
  • Ansible
  • Ldap
  • Gitlab
  • GitHub
  • Etcd
  • Consul
  • RabbitMQ
  • Kafka
  • MySql
  • MongoDB
  • OpenVPN
  • KVM
  • VMware
  • Other
  • ELK
  • K8S
  • Nexus
  • Jenkins
  • 随写编年
  • 家人物语
  • 追忆青春
  • 父亲的朋友圈
  • 电影音乐
  • 效率工具
  • 博客相关
  • Shell
  • 前端实践
  • Vue学习笔记
  • Golang学习笔记
  • Golang编程技巧
  • 学习周刊
  • Obsidian插件周刊
关于
友链
推广
  • 本站索引

    • 分类
    • 标签
    • 归档
  • 本站页面

    • 导航
    • 打赏
  • 我的工具

    • 备忘录清单 (opens new window)
    • 网站状态 (opens new window)
    • json2go (opens new window)
    • 微信MD编辑 (opens new window)
    • 国内镜像 (opens new window)
    • 出口IP查询 (opens new window)
    • 代码高亮工具 (opens new window)
  • 外站页面

    • 开往 (opens new window)
    • ldapdoc (opens new window)
    • HowToStartOpenSource (opens new window)
    • vdoing-template (opens new window)
GitHub (opens new window)
  • 最佳实践

  • 迎刃而解

  • Nginx

  • Php

  • Zabbix

  • Prometheus

  • Grafana

  • CentOS

  • Supervisord

  • Systemd

  • Docker

  • Docker-Compose

  • Rancher

  • Ansible

  • OpenLdap

  • GitLab

  • GitHub

    • GitHub中开源项目维护流程手册
    • 分享我的开源项目Thank-Mirror
    • 一个仅需三步配置就能生成免费个人博客的开源模板vdoing-template
    • 如何将个人的GitHub主页配置的优雅好看
    • 利用GitHub Actions自动为README添加TOC目录
    • 利用GitHub Actions自动将项目贡献者列表添加到README中
    • 利用GitHub Actions自动优雅地为项目构建Releases
    • 利用GitHub Actions自动获取博客rss文章
    • 利用GitHub Actions自动构建项目的docker镜像并发布到DockerHub
    • 利用GitHub Actions自动生成GitHub的Fans
      • 前言
      • 配置
      • 效果
    • 利用GitHub Actions自动生成个人star列表并归类
    • 利用GitHub Actions自动对仓库内图片进行无损压缩
    • 利用GitHub Actions自动检测项目中的问题链接
    • 利用GitHub Actions自动构建go项目的二进制到release
    • 利用github-slug-action暴漏Github Action上下文中的关键变量
  • Etcd

  • Consul

  • RabbitMQ

  • Kafka

  • Mysql

  • MongoDB

  • OpenVPN

  • Kvm

  • VMware

  • 配置文件详解

  • Other

  • 运维观止
  • GitHub
二丫讲梵
2022-07-29
目录

利用GitHub Actions自动生成GitHub的Fans

这篇文章的发布时间较早,其中的内容可能已经过时,阅读时请注意甄别。

# 前言

GitHub中的follow功能,类似于微博中的关注,而关注我们的大佬,就更应该有一个合适的地方安排,本文将分享如何基于GitHub Actions自动生成个人的Fans列表。

# 配置

所用 Actions。

  • github-followers-action (opens new window):生成Fans的主动作。
  • github-push-action (opens new window):提供push能力的动作。

使用配置其实非常简单,基本上阅读完官方介绍文档就可以上手使用了。

首先需要在将要生成目录的文件内,指定目录生成位置,e.g. README.md,在要生成的地方添加如下内容:

<!--ACTION_START_FLAG:github-followers-->
<!--ACTION_END_FLAG:github-followers-->
1
2

然后添加 Actions 配置文件,e.g. .github/workflows/follow.yml:

name: Get Top Followers
on:
  push:
    branches:
      - master
  schedule:
    - cron: '0 20 * * *'
jobs:
  github_followers_job:
    runs-on: ubuntu-latest
    name: A job to display github followers in your profile
    steps:
      - uses: actions/checkout@v3

      - name: use github-follower-action to update README.md
        id: github-follower
        uses: JieDing/github-followers@main
        env:
          login: ${{ github.repository_owner }}
          pat: ${{ secrets.ACCESS_TOKEN }}
      - name: Commit changes
        run: |
            git config --local user.email "eryajf@163.com"
            git config --local user.name "eryajf"
            git add -A
            git diff-index --quiet HEAD || git commit -m "Update GitHub followers"
      - name: Pull changes
        run: git pull -r
      - name: Push changes
        uses: ad-m/github-push-action@master
        with:
          github_token: ${{ secrets.ACCESS_TOKEN }}
          branch: ${{ github.ref }}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

配置项也都比较简单,不做过多赘述,根据自己的实际情况调整即可。

配置文件中用到了 ACCESS_TOKEN,我的这篇文章有详细介绍如何生成以及配置,可直接参考: https://wiki.eryajf.net/pages/47a507/ (opens new window)

# 效果

如上动作每当master代码有push动作时将会运行,以及每天晚上八点会运行一次。

呈现效果如下:

然后就可以把如上内容放在个人的主页中。

看完本文,快快制作你的Fans列表吧。

微信 支付宝
上次更新: 2022/08/19, 09:49:20

← 利用GitHub Actions自动构建项目的docker镜像并发布到DockerHub 利用GitHub Actions自动生成个人star列表并归类→

最近更新
01
go-cache包的使用简析
03-19
02
学习周刊-总第98期-2023年第11周
03-17
03
使用retry-go给项目添加重试机制
03-15
更多文章>
Theme by Vdoing | Copyright © 2017-2023 | 点击查看十年之约 | 浙ICP备18057030号
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式