Skip to content

Commit 29f05e0

Browse files
authored
docs: Document Github App Token support (#180)
docs: Adjust the GitHub App Token documentation
1 parent 9a2e3c1 commit 29f05e0

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,36 @@ jobs:
8686
force_with_lease: true
8787
```
8888
89+
An example workflow to use a GitHub App Token together with the default token inside the checkout action. You can find more information on the topic [here](https://github.com/ad-m/github-push-action/issues/173):
90+
91+
```yaml
92+
jobs:
93+
build:
94+
runs-on: ubuntu-latest
95+
steps:
96+
- uses: actions/checkout@v3
97+
with:
98+
ref: ${{ github.head_ref }}
99+
fetch-depth: 0
100+
persist-credentials: false
101+
- name: Generate Githup App Token
102+
id: generate_token
103+
uses: tibdex/github-app-token@v1
104+
with:
105+
app_id: ${{ secrets.APP_ID }}
106+
installation_id: ${{ secrets.INSTALLATION_ID }}
107+
private_key: ${{ secrets.APP_PRIVATE_KEY }}
108+
- name: Commit files
109+
run: |
110+
git config --local user.email "test@test.com"
111+
git config --local user.name "Test"
112+
git commit -a -m "Add changes"
113+
- name: Push changes
114+
uses: ad-m/github-push-action@master
115+
with:
116+
github_token: ${{ env.TOKEN }}
117+
```
118+
89119
An example workflow to use the non default token push to another repository. Be aware that the force-with-lease flag is in such a case not possible:
90120
91121
```yaml

0 commit comments

Comments
 (0)