You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+64-3Lines changed: 64 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,8 @@ The [personal access token](https://github.com/settings/tokens/).
34
34
35
35
Need to note, you can't use `GITHUB_TOKEN` because of [this limitation](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#triggering-new-workflows-using-a-personal-access-token)
36
36
37
+
Alternatively, you can use a **GitHub App token** for better security and flexibility. See the "GitHub App Token Setup" section below.
38
+
37
39
### `base`
38
40
39
41
**Required**
@@ -90,12 +92,12 @@ This github action doesn't set any default parameters.
90
92
91
93
**Optional**
92
94
93
-
Check if having auto-merge enabled in the PR is required, in order for the PR to
94
-
be considered. It defaults to `true`, but if set to `false`, all PRs are
95
-
considered for update (not just those with auto-merge enabled).
95
+
Check if having auto-merge enabled in the PR is required, in order for the PR to be considered. It defaults to `true`, but if set to `false`, all PRs are considered for update (not just those with auto-merge enabled).
96
96
97
97
## Example usage
98
98
99
+
### Using Personal Access Token
100
+
99
101
```yml
100
102
name: PR update
101
103
@@ -122,6 +124,64 @@ jobs:
122
124
123
125
Replace the `VERSION_YOU_WANT_TO_USE` with the actual version you want to use, check the version format [here](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsuses)
124
126
127
+
### Using GitHub App Token
128
+
129
+
To improve security and flexibility, you can use a GitHub App token instead of a personal access token.
130
+
131
+
#### Steps to Set Up the GitHub App
132
+
133
+
1. **Create a GitHub App**:
134
+
- Go to your GitHub Organization settings and create a new GitHub App.
135
+
2. **Generate a Private Key**:
136
+
- Once the app is created, generate a private key for authentication.
137
+
3. **Assign Permissions**:
138
+
- Grant the following permissions:
139
+
- **Metadata**: Read access
140
+
- **Content**: Read and write access
141
+
- **Pull Requests**: Read and write access
142
+
4. **Install the App**:
143
+
- Install the app on all repositories or specific repositories where this action will run.
144
+
5. **Save Variables and Secrets**:
145
+
- Save the App ID as a repository or organization variable.
146
+
- Save the private key as a repository or organization secret.
147
+
148
+
__If you have branch protection rules, ensure the GitHub App has an exemption to bypass those rules.__
0 commit comments