Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js 12.x
uses: actions/setup-node@v1
- uses: actions/checkout@v3
- name: Use Node 16
uses: actions/setup-node@v3
with:
node-version: 12
node-version: 16
- run: npm ci
- run: npm run format:check
- run: npm run build
36 changes: 20 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ Updates `README.md` with the recent GitHub activity of a user.

```yml
name: Update README

on:
schedule:
- cron: '*/30 * * * *'
- cron: "*/30 * * * *"
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
name: Update this repo's README with recent activity
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: jamesgeorge007/github-activity-readme@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -39,6 +39,7 @@ The above job runs every half an hour, you can change it as you wish based on th
Please note that only those public events that belong to the following list show up:-

- `IssueEvent`
- `ReleaseEvent`
- `IssueCommentEvent`
- `PullRequestEvent`

Expand All @@ -48,33 +49,36 @@ You can find an example [here](https://github.com/jamesgeorge007/jamesgeorge007/

Use the following `input params` to customize it for your use case:-

| Input Param | Default Value | Description |
|--------|--------|--------|
| `COMMIT_MSG` | :zap: Update README with the recent activity | Commit message used while committing to the repo |
| `MAX_LINES` | 5 | The maximum number of lines populated in your readme file |

| Input Param | Default Value | Description |
| -------------- | ----------------------------------------------------- | --------------------------------------------------------- |
| `COMMIT_NAME` | github-actions[bot] | Name of the committer |
| `COMMIT_EMAIL` | 41898282+github-actions[bot]@users.noreply.github.com | Email of the committer |
| `COMMIT_MSG` | :zap: Update README with the recent activity | Commit message used while committing to the repo |
| `MAX_LINES` | 5 | The maximum number of lines populated in your readme file |
| `TARGET_FILE` | README.md | The file to insert recent activity into |

```yml
name: Update README

on:
schedule:
- cron: '*/30 * * * *'
- cron: "*/30 * * * *"
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
name: Update this repo's README with recent activity
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: jamesgeorge007/github-activity-readme@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
COMMIT_MSG: 'Specify a custom commit message'
COMMIT_MSG: "Specify a custom commit message"
MAX_LINES: 10
COMMIT_NAME: GitHub Activity Readme
```

_Inspired by [JasonEtco/activity-box](https://github.com/JasonEtco/activity-box)_
17 changes: 14 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,17 @@ author: jamesgeorge007

inputs:
GH_USERNAME:
description: 'Your GitHub username'
description: "Your GitHub username"
default: ${{ github.repository_owner }}
required: false
COMMIT_NAME:
description: "Name of the committer"
default: "github-actions[bot]"
required: false
COMMIT_EMAIL:
description: "Email of the committer"
default: "41898282+github-actions[bot]@users.noreply.github.com"
required: false
COMMIT_MSG:
description: "Commit message used while committing to the repo"
default: ":zap: Update README with the recent activity"
Expand All @@ -15,11 +23,14 @@ inputs:
description: "The maximum number of lines populated in your readme file"
default: 5
required: false

TARGET_FILE:
description: "The file location to write changes to"
default: "README.md"
required: false
branding:
color: yellow
icon: activity

runs:
using: node12
using: node16
main: dist/index.js
Loading