Skip to content

⚡️📌 Update a pinned gist to contain the latest activity of a user

License

Notifications You must be signed in to change notification settings

abduljaleel/github_log

Repository files navigation

GitHub Log

⚡️📌 Update a pinned gist to contain the latest activity of a user


Setup

github_log is a GitHub Action that is designed to work using the schedule event.

Prep work

  1. Create a new public GitHub Gist (https://gist.github.com/)
  2. Create a token with the gist scope and copy it. The GITHUB_TOKEN that comes with GitHub Actions cannot currently use the Gist API.

Project setup

  1. Create a template repository by clicking here. Alternatively, you can click the Use this template button

Name your repository and click Create repository from template.

  1. Create a .github/workflows/activity-box.yml file with a workflow like this:
name: GitHub Log

on:
  schedule:
    - cron: '*/10 * * * *'

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v1
      - uses: abduljaleel/github_log@master
        env:
          GH_PAT: ${{ secrets.GH_PAT }}
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          GH_USERNAME: abduljaleel
          GIST_ID: 314pi
  1. Create a secret 🔑 by going to GitHub repo > Settings > Secrets > New secret with the following:
  • Name: GH_PAT.
  • Value: The token with the gist scope generated previously.
  1. 💰 Profit

Environment variables & secrets

  • GIST_ID: The ID portion from your gist url https://gist.github.com/abduljaleel/6d5f84419863089a167387da62dd7081.
  • GH_PAT: The GitHub token generated above.
  • GH_USERNAME: The username handle of the GitHub account.

About

⚡️📌 Update a pinned gist to contain the latest activity of a user

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published