Skip to content

Commit d1a650b

Browse files
committed
Document required workaround for LFS-enabled repositories
Closes #43
1 parent 8a64997 commit d1a650b

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,40 @@ with **repo** and **workflow** scope and pass it to the action.
144144

145145
To know more about how to pass a secret to GitHub actions you can [Read GitHub Docs](https://docs.github.com/en/actions/reference/encrypted-secrets)
146146

147+
### A note about Git Large File Storage (LFS)
148+
149+
If your repository uses [Git LFS](https://git-lfs.github.com/), you will need to manually remove the LFS-related hook files, otherwise the action
150+
will fail because Git will not be able to create a branch because the lfs executable is not installed inside the
151+
container used by this action.
152+
153+
To work around this, just remove the hook files manually as an extra step **before** this action executes:
154+
155+
```yaml
156+
# ...
157+
jobs:
158+
build:
159+
runs-on: ubuntu-latest
160+
161+
steps:
162+
- uses: actions/checkout@v2
163+
with:
164+
token: ${{ secrets.WORKFLOW_SECRET }}
165+
lfs: false
166+
167+
- name: Remove LFS hooks
168+
# This repository uses Git LFS, but it not being
169+
# in the container causes the action to fail to create a new branch.
170+
# Removing the hooks manually is harmless and works around this issue.
171+
run: |
172+
rm .git/hooks/post-checkout
173+
rm .git/hooks/pre-push
174+
175+
- name: Run GitHub Actions Version Updater
176+
uses: saadmk11/github-actions-version-updater@v0.7.1
177+
with:
178+
# ...
179+
```
180+
147181
### GitHub Actions Version Updater in Action
148182

149183
![GitHub Actions Version Updater Demo](https://github.com/__user-images/24854406/113888349-15dbdc00-97e4-11eb-91a6-622828455d1f.gif)

0 commit comments

Comments
 (0)