Skip to content

Commit

Permalink
fix(workflow): add empty commit if no activity has been detected for …
Browse files Browse the repository at this point in the history
…over 50 days (#115)

* fix(workflow): added empty commit function

* fix(workflow): optimize error handling

* fix(workflow): add debug for difference in days and remove unprocessed options

* fix(workflow): updated empty commit function

* fix(workflow): fix variable resolution

---------

Co-authored-by: tuunit <jan@larwig.com>
  • Loading branch information
aeswibon and tuunit committed Mar 28, 2024
1 parent a38649b commit df57d5c
Show file tree
Hide file tree
Showing 7 changed files with 19,894 additions and 19,806 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/node.js.yml
Expand Up @@ -9,11 +9,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Use Node 16
uses: actions/setup-node@v3
- uses: actions/checkout@v4
- name: Use Node 20
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20
- run: npm ci
- run: npm run format:check
- run: npm run build
17 changes: 9 additions & 8 deletions README.md
Expand Up @@ -49,14 +49,15 @@ 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 |
| -------------- | ----------------------------------------------------- | --------------------------------------------------------- |
| `GH_USERNAME` | Your GitHub username | Username for which to generate the activity overview |
| `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 |
| Input Param | Default Value | Description |
| ------------------ | ------------------------------------------------------------------------ | --------------------------------------------------------- |
| `GH_USERNAME` | Your GitHub username | Username for which to generate the activity overview |
| `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 |
| `EMPTY_COMMIT_MSG` | :memo: empty commit to keep workflow active after 60 days of no activity | Commit message used when there are no updates |
| `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
Expand Down
6 changes: 5 additions & 1 deletion action.yml
Expand Up @@ -27,10 +27,14 @@ inputs:
description: "The file location to write changes to"
default: "README.md"
required: false
EMPTY_COMMIT_MSG:
description: "Commit message used when there are no updates"
default: ":memo: empty commit to keep workflow active after 60 days of no activity"
required: false
branding:
color: yellow
icon: activity

runs:
using: node16
using: node20
main: dist/index.js

0 comments on commit df57d5c

Please sign in to comment.