Skip to content

Commit 31c1a88

Browse files
authored
git add -Aを使う (#124)
1 parent 4eabafd commit 31c1a88

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

action.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,17 @@ inputs:
2323
runs:
2424
using: "composite"
2525
steps:
26+
- shell: bash
27+
if: github.event_name != 'pull_request' || github.event.action != 'closed'
28+
name: git add
29+
run: git add -A
2630
# 差分があったときは差分を出力する
2731
- name: Show diff
2832
id: diff
2933
shell: bash
3034
if: github.event_name != 'pull_request' || github.event.action != 'closed'
3135
run: |
32-
result=$(git diff)
36+
result=$(git diff --cached)
3337
echo "::set-output name=result::$result"
3438
# 差分があったときは、コミットを作りpushする
3539
- name: Push
@@ -42,7 +46,6 @@ runs:
4246
git config user.name "github-actions[bot]"
4347
EMAIL="41898282+github-actions[bot]@users.noreply.github.com"
4448
git config user.email "${EMAIL}"
45-
git add -u
4649
git commit -m "${{inputs.pr-title-prefix}}"
4750
REPO_URL="https://"
4851
REPO_URL+="${{github.actor}}:${{inputs.github-token}}@github.com/"

0 commit comments

Comments
 (0)