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
+30Lines changed: 30 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -86,6 +86,36 @@ jobs:
86
86
force_with_lease: true
87
87
```
88
88
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
+
89
119
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:
0 commit comments