Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
star

GitHub Action

Stargazer Action

v1.1.2

Stargazer Action

star

Stargazer Action

Generates a list of starred repositories

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Stargazer Action

uses: rverst/[email protected]

Learn more about this action in rverst/stargazer

Choose a version

stargazer

stargazer creates a sorted list of your stared GitHub repositories. Like an Awesome list, but personal. Automated with GitHub-Actions.

See rverst/stars for an example. You can use that repositorie as a template, the README.md will get overwritte with your own list if you run the stargazer-action (runs daily at 02:42).

Usage

Probably the easiest way to get your own stargazer list is to have a repository with a workflow that uses the GitHub action. All you need to do is create a new repository and create the following workflow.

# This workflow builds a list of your starred repositories
name: Stargazer

on:
  schedule:
    - cron: '42 2 * * *'

  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
      - uses: actions/checkout@v2

      # Generate the list
      - name: Create star list
        id: stargazer
        uses: rverst/[email protected]
        with:
          github-user: ${{ github.actor }}
          github-token: ${{ secrets.GITHUB_TOKEN }}
          list-file: "README.md"
          # you can ignore repositories, that will not get on the list
          # ignored-repositories: ${{ secrets.IGNORE_REPO }}

      # Commit the changes
      - name: Commit files
        run: |
          git config --local user.email "[email protected]"
          git config --local user.name "github-actions[bot]"
          git add .
          git commit -m "Update list"

      # Push the changes
      - name: Push
        uses: ad-m/github-push-action@master
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          branch: ${{ github.ref }}

Inputs

Name Type Required Description
github-user string true GitHub user whose stars are fetched
github-token string true Access token for the GitHub API
list-file string false Filename of the stargazer list (default: README.md)
ignored-repositories string false Comma separated list of repositories (user/repo) to ignore

Inspiration

stargazer is inspired by starred, which is very similar and written in python. I created stargazer because I wanted to try out the GitHub GraphQL API v4.