Skip to content

Commit 9382876

Browse files
Improve README
Improves the readability and clearity of README Includes: - more sample workflows, - use case of custom secret - description of inputs
1 parent 1ecebff commit 9382876

1 file changed

Lines changed: 84 additions & 6 deletions

File tree

README.md

Lines changed: 84 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,77 @@ The changes reflected in the digest will be the last comment by the digest to th
1111
# Usage
1212

1313
As Github Digester will create issues and add comments, it is important to enable read/write access to GITHUB_TOKENs
14-
if you are not planning to use PAT.
14+
if you are not planning to use PAT.
15+
1516
You can enable it in `Settings` -> `Actions` -> `General` -> `Workflow permissions`.
1617

18+
19+
1720
To use this action in your workflow, you can add the following step:
1821

1922
```yaml
2023
steps:
2124
- name: Create digest
2225
uses: Eclipse-Dominator/Github_Digest@v0.1.6c-alpha
2326
with:
24-
secret: PAT/Github Token (default to secrets.GITHUB_TOKEN)
25-
repo: repository to monitor (default to the current repo)
26-
save: folder where digest settings are saved (defaut to .github/digests)
27-
timezone: country/regional representation of the local timezone (defaults to utc)
27+
secret: <github token> # default to secrets.GITHUB_TOKEN
28+
repo: <owner>/<repo> # repository to monitor, default to the current repo
29+
save: <save foler path> # save folder of the digest data, defaut to .github/digests
30+
timezone: "<tz identifier>" # set the timezone of the displayed time, defaults to utc
31+
```
32+
33+
## Tips
34+
35+
- By default, the users creating the issue and commenting the issue is `github-actions [bot]`, this can be customised to a custom account by feeding a custom PAT to secret.
36+
37+
- You can monitor another repository by feeding a custom repo to the repo input.
38+
39+
- You can obtain a list of `tz identifier` [here](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)
40+
41+
# Sample Workflow files
42+
Below are some sample workflow that can be added to `.github/workflows` that you can use/reference to use the actions.
43+
44+
Minimal sample to run digest (UTC timezone)
45+
---
46+
```yaml
47+
name: Issue Digest
48+
49+
on:
50+
schedule:
51+
- cron: '0 0 * * *' # runs once at 00:00 daily
52+
53+
jobs:
54+
issue-digest:
55+
runs-on: ubuntu-latest
56+
57+
steps:
58+
- name: Run Issue Digest Action
59+
uses: Eclipse-Dominator/Github_Digest@v0.1.6c-alpha
60+
```
61+
62+
Add digest to your current repository in a different timezone
63+
---
64+
```yaml
65+
name: Issue Digest
66+
67+
on:
68+
schedule:
69+
- cron: '0 0 * * *' # runs once at 00:00 daily
70+
workflow_dispatch:
71+
72+
jobs:
73+
issue-digest:
74+
runs-on: ubuntu-latest
75+
76+
steps:
77+
- name: Run Issue Digest Action
78+
uses: Eclipse-Dominator/Github_Digest@v0.1.6c-alpha
79+
with:
80+
timezome: "Singapore"
2881
```
2982

30-
To run the action daily or on manually, you can add the following action:
83+
Add digest to monitor issues in another repository
84+
---
3185
```yaml
3286
name: Issue Digest
3387
@@ -43,4 +97,28 @@ jobs:
4397
steps:
4498
- name: Run Issue Digest Action
4599
uses: Eclipse-Dominator/Github_Digest@v0.1.6c-alpha
100+
with:
101+
repo: "some_owner/some_repo"
102+
timezome: "Singapore"
46103
```
104+
105+
Add digest with your own custom PAT token
106+
---
107+
```yaml
108+
name: Issue Digest
109+
110+
on:
111+
schedule:
112+
- cron: '0 0 * * *' # runs once at 00:00 daily
113+
workflow_dispatch:
114+
115+
jobs:
116+
issue-digest:
117+
runs-on: ubuntu-latest
118+
119+
steps:
120+
- name: Run Issue Digest Action
121+
uses: Eclipse-Dominator/Github_Digest@v0.1.6c-alpha
122+
with:
123+
secret: ${{ secrets.YOUR_SECRET_TOKEN }}
124+
```

0 commit comments

Comments
 (0)