Skip to content

Commit

Permalink
git add -Aを使う (#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
Goryudyuma authored Aug 5, 2022
1 parent 4eabafd commit 31c1a88
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
7 changes: 5 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,17 @@ inputs:
runs:
using: "composite"
steps:
- shell: bash
if: github.event_name != 'pull_request' || github.event.action != 'closed'
name: git add
run: git add -A
# 差分があったときは差分を出力する
- name: Show diff
id: diff
shell: bash
if: github.event_name != 'pull_request' || github.event.action != 'closed'
run: |
result=$(git diff)
result=$(git diff --cached)
echo "::set-output name=result::$result"
# 差分があったときは、コミットを作りpushする
- name: Push
Expand All @@ -42,7 +46,6 @@ runs:
git config user.name "github-actions[bot]"
EMAIL="41898282+github-actions[bot]@users.noreply.github.com"
git config user.email "${EMAIL}"
git add -u
git commit -m "${{inputs.pr-title-prefix}}"
REPO_URL="https://"
REPO_URL+="${{github.actor}}:${{inputs.github-token}}@github.com/"
Expand Down

0 comments on commit 31c1a88

Please sign in to comment.