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
* chore(deps): bump dependecies
* chore: add "inputs" script
* chore: commit local work
* chore: delete lib folder
* chore: commit local work
* BREAKING: edit action options
- force has been deleted, pass the '-f' parameter to add and remove
- ref is now called branch
* [auto] build: update compiled version
* chore: improve input checks
* [auto] build: update compiled version
* fix: pathspec errors should be catched differently
* [auto] build: update compiled version
* fix: check for 'add' and 'remove' before running commands
* [auto] build: update compiled version
* fix: log git commands
* [auto] build: update compiled version
* fix: improve logs' readability
* [auto] build: update compiled version
* chore: try not resetting files
* [auto] build: update compiled version
* fix: ignore errors on 2nd stage, log them on 1st
* [auto] build: update compiled version
* fix: signoff
* [auto] build: update compiled version
* fix: log git tag output
* [auto] build: update compiled version
* fix: use proper method for tagging
* [auto] build: update compiled version
* fix: use dedicated method for pushing tags
* [auto] build: update compiled version
* fix: using pure git tag command is better
* [auto] build: update compiled version
* fix: improve error handling
* [auto] build: update compiled version
* fix: I messed up the lines
* [auto] build: update compiled version
* fix: fix tags push when there's a forced update
* [auto] build: update compiled version
* fix: log errors too
* chore: remove unused dependecy
* [auto] build: update compiled version
* fix: don't log when using ignoreErrors
* [auto] build: update compiled version
* fix: fetch tags
* [auto] build: update compiled version
* fix: try forcing tag fetch
* [auto] build: update compiled version
* fix: try using original command for pushing tags
* [auto] build: update compiled version
* fix: try removing repo from tag command
* [auto] build: update compiled version
* fix: try with object options
* [auto] build: update compiled version
* i don't even know anymore
* [auto] build: update compiled version
* fix: try deleting the tag when it's rejected
* [auto] build: update compiled version
* fix: isolate tag name
* [auto] build: update compiled version
* fix: log result of tag deletion
* [auto] build: update compiled version
* fix: use actual values instead of references
* [auto] build: update compiled version
* fix: join netrc path with module
* [auto] build: update compiled version
* fix-: try not using .netrc at all
* [auto] build: update compiled version
* fix: remove .netrc config
* [auto] build: update compiled version
* chore: remove old shell file
* docs: update README
* chore: fix typo in action manifest
* chore: move ncc to dev-deps
* fix: cwd not working properly
* [auto] build: update compiled version
Copy file name to clipboardExpand all lines: README.md
+17-23Lines changed: 17 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ This action lets you choose the path that you want to use when adding & committi
12
12
Add a step like this to your workflow:
13
13
14
14
```yaml
15
-
- uses: EndBug/add-and-commit@v4# You can change this to use a specific version
15
+
- uses: EndBug/add-and-commit@v5# You can change this to use a specific version
16
16
with:
17
17
# The arguments for the `git add` command (see the paragraph below for more info)
18
18
# Default: '.'
@@ -26,33 +26,29 @@ Add a step like this to your workflow:
26
26
# Default: author of the commit that triggered the run
27
27
author_email: mail@example.com
28
28
29
+
# Name of the branch to use, if different from the one that triggered the workflow
30
+
# Default: the branch that triggered the run
31
+
branch: some-branch
32
+
29
33
# The local path to the directory where your repository is located. You should use actions/checkout first to set it up
30
34
# Default: '.'
31
35
cwd: './path/to/the/repo'
32
36
33
-
# Whether to use the --force option on `git add`, in order to bypass eventual gitignores
34
-
# Default: false
35
-
force: true
36
-
37
-
# Whether to use the --signoff option on `git commit`
38
-
# Default: false
39
-
signoff: true
40
-
41
37
# The message for the commit
42
38
# Default: 'Commit from GitHub Actions'
43
39
message: 'Your commit message'
44
40
45
-
# Name of the branch to use, if different from the one that triggered the workflow
46
-
# Default: the branch that triggered the workflow (from GITHUB_REF)
47
-
ref: 'someOtherBranch'
48
-
49
41
# The arguments for the `git rm` command (see the paragraph below for more info)
50
42
# Default: ''
51
43
remove: "./dir/old_file.js"
52
44
53
-
# Name of the tag to add to the new commit (see the paragraph below for more info)
45
+
# Whether to use the --signoff option on `git commit` (only `true` and `false` are accepted)
46
+
# Default: false
47
+
signoff: true
48
+
49
+
# Arguments for the git tag command (the tag name always needs to be the first word not preceded by an hyphen)
54
50
# Default: ''
55
-
tag: "v1.0.0"
51
+
tag: "v1.0.0 --force"
56
52
57
53
env:
58
54
# This is necessary in order to push a commit to the repo
@@ -66,18 +62,17 @@ That said, you can just copy the example line and not worry about it. If you do
66
62
67
63
### Adding files:
68
64
69
-
The action adds files using a regular `git add` command, so you can put every kind of argument in the `add` option. For example, if you don't want it to use a recursive behavior: `$(find . -maxdepth 1 -name *.js)`.
65
+
The action adds files using a regular `git add` command, so you can put every kind of argument in the `add` option. For example, if you want to force-add a file: `./path/to/file.txt --force`.
70
66
The script will not stop if one of the git commands fails. E.g.: if your command shows a "fatal: pathspec 'yourFile' did not match any files" error the action will go on.
71
67
72
68
### Deleting files:
73
69
74
-
You can delete files with the `remove` option: that runs a `git rm` command that will stage the files in the given path for removal.
70
+
You can delete files with the `remove` option: that runs a `git rm` command that will stage the files in the given path for removal. As with the `add` argument, you can use every option `git rm` allows (e.g. add `--force` to ignore `.gitignore` rules).
75
71
The script will not stop if one of the git commands fails. E.g.: if your command shows a "fatal: pathspec 'yourFile' did not match any files" error the action will go on.
76
72
77
73
### Tagging:
78
74
79
-
You can tag commits with the `tag` option: when used, it will create a lightweight tag for the commit with the name you set as input. If not entered (or if an empty string is passed) teh action won't create any tag.
80
-
If there is already a tag with the name you entered it will be overwritten, and so the tag will be "updated".
75
+
You can use the `tag` option to enter the arguments for a `git add` command. In order for the action to isolate the tag name from the rest of the arguments, it should be the first word not preceded by an hyphen (e.g. `-a tag-name -m "some other stuff"` is ok).
81
76
82
77
### Examples:
83
78
@@ -107,7 +102,7 @@ jobs:
107
102
run: eslint "src/**" --fix
108
103
109
104
- name: Commit changes
110
-
uses: EndBug/add-and-commit@v4
105
+
uses: EndBug/add-and-commit@v5
111
106
with:
112
107
author_name: Your Name
113
108
author_email: mail@example.com
@@ -138,12 +133,11 @@ jobs:
138
133
- run: echo "123" > ./pathToRepo/file.txt
139
134
140
135
# ...and then use the action as you would normally do, but providing the path to the repo
0 commit comments