Skip to content

Commit 9cfa5a2

Browse files
committed
update readme
1 parent d2f90e6 commit 9cfa5a2

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

.github/workflows/report_test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
ref: test-action # branch name
4141
path: test-action-dir # checkout path
4242

43-
- run: cd test-action-dir && echo 1>>f && git status -s && git diff --staged --name-only
43+
- run: cd test-action-dir && echo '1' >> f && git status -s && git diff --staged --name-only
4444
- name: Local git-commit-pull-push-action 1
4545
uses: ./
4646
with:
@@ -49,7 +49,7 @@ jobs:
4949
commit_message: message ${{ github.run_id }}
5050
pull_args: --dry-run
5151

52-
- run: cd test-action-dir && echo 2>>f && git status -s && git diff --staged --name-only
52+
- run: cd test-action-dir && echo '2' >> f && git status -s && git diff --staged --name-only
5353
- name: Local git-commit-pull-push-action 2
5454
uses: ./
5555
with:

README.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,24 @@ Runs git add, git commit, git pull and git push.
44

55
The action flow:
66

7-
1. git add .
7+
1. `git add .`
88
2. check if there are any changed files
9-
3. git commit
10-
4. git pull (with args)
11-
5. git push
9+
3. `git commit`
10+
4. `git pull` (with args)
11+
5. `git push`
1212

1313
Originally designed to run `git pull --rebase -X ours` or `git pull --rebase -X theirs` after commit to help pushing changed to `gh-pages`.
1414

1515
## Usage
1616

17-
todo
17+
```yaml
18+
- run: cd test-action-dir && echo 1>>f && git status -s && git diff --staged --name-only
19+
- name: Git Commit and Push Action
20+
uses: mgrybyk/git-commit-pull-push-action@v1
21+
with:
22+
repository: test-action-dir
23+
branch: test-action
24+
commit_message: Apply automatic changes
25+
pull_args: --rebase -X theirs
26+
```
1827

0 commit comments

Comments
 (0)