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
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,6 +54,11 @@ Add a step like this to your workflow:
54
54
# Default: github_actor
55
55
default_author: github_actor
56
56
57
+
# Arguments for the git fetch command. If set to false, the action won't fetch the repo.
58
+
# For more info as to why fetching is usually recommended, please see the "Performance on large repos" FAQ.
59
+
# Default: --tags --force
60
+
fetch: false
61
+
57
62
# The message for the commit.
58
63
# Default: 'Commit from GitHub Actions (name of the workflow)'
59
64
message: 'Your commit message'
@@ -200,6 +205,14 @@ Some users reported that they were getting an error:
200
205
201
206
If you're getting this error and you're using `actions/checkout@v1`, try upgrading to `actions/checkout@v2`. If you're still having problems after upgrading, feel free to open an issue. Issue ref: [#146](https://github.com/EndBug/add-and-commit/issues/146)
202
207
208
+
### Performance on large repos
209
+
210
+
By default, the action will fetch the repository before starting to work on it: this ensures that it can see the already existing refs.
211
+
212
+
When working with a repository that has a lot of branches and tags, fetching it can take a long time. If the fetch step is taking too much time, you can decide to skip it by setting the `fetch` input to `false`: this will prevent the action from running `git fetch` altogether.
213
+
214
+
Please note that you have to set up your workflow accordingly: not fetching the repo can impact branch and tag creation within the action, and for this reason it's recommended to disable it only if necessary. Issue ref: [#386](https://github.com/EndBug/add-and-commit/issues/386)
'Creating a new branch without fetching the repo first could result in an error when pushing to GitHub. Refer to the action README for more info about this topic.'
79
+
)
80
+
62
81
awaitgit
63
82
.checkout(targetBranch)
64
83
.then(()=>{
@@ -110,6 +129,12 @@ core.info(`Running in ${baseDir}`)
110
129
111
130
if(getInput('tag')){
112
131
core.info('> Tagging commit...')
132
+
133
+
if(!fetchOption)
134
+
core.warning(
135
+
'Creating a tag without fetching the repo first could result in an error when pushing to GitHub. Refer to the action README for more info about this topic.'
0 commit comments