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
| `target_branch` | No | *current branch* | Name of a new branch to push the code into. Creates branch if not existing unless there are no changes and `amend` is false. |
87
+
| `repository_path` | No | `.` | Relative path under `${{ github.workspace }}` where the repository is checked out. Set this when `actions/checkout` uses `path:`. |
87
88
88
89
89
90
### 📤 Output Parameters
@@ -186,6 +187,34 @@ jobs:
186
187
force_with_lease: true # Safer force push option
187
188
```
188
189
190
+
### 📁 Custom checkout path example
191
+
Commit and push when `actions/checkout` uses a custom path.
192
+
193
+
```yaml
194
+
name: Commit from custom checkout path
195
+
on:
196
+
push
197
+
jobs:
198
+
change-and-push:
199
+
runs-on: ubuntu-latest
200
+
steps:
201
+
- name: Checkout repository into custom path
202
+
uses: actions/checkout@v6
203
+
with:
204
+
path: work/repo
205
+
206
+
- name: Change something in checked out repository
207
+
run: |
208
+
echo "Updated" >> work/repo/README.md
209
+
210
+
- name: Commit and push changes
211
+
uses: devops-infra/action-commit-push@v1.2.2
212
+
with:
213
+
github_token: ${{ secrets.GITHUB_TOKEN }}
214
+
repository_path: work/repo
215
+
commit_message: "Update README"
216
+
```
217
+
189
218
## 📝 Amend Options
190
219
When using `amend: true`, you have several options for handling the commit message:
0 commit comments