Skip to content

Commit cea263c

Browse files
authored
差分検知のみにして、ログに出す量を減らして高速化する (#1801)
* 差分出力のところで、出力対象をファイル名のみにして、差分を減らす * 差分があるかないかを返す * detect diffに変更 * fix
1 parent e89f836 commit cea263c

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ inputs:
3232
runs:
3333
using: "composite"
3434
steps:
35-
# 差分があったときは差分を出力する
36-
- name: Show diff
35+
# 差分があったときに検知する
36+
- name: Detect diff
3737
id: diff
3838
shell: bash
3939
if: github.event_name != 'pull_request' || github.event.action != 'closed'
4040
working-directory: ${{inputs.working-directory}}
41-
run: ${{ github.action_path }}/src/show_diff.sh
41+
run: ${{ github.action_path }}/src/detect_diff.sh
4242
- name: Set env
4343
id: set-env
4444
shell: bash

src/detect_diff.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env bash
2+
3+
git add -A
4+
5+
if git diff --cached --quiet; then
6+
result=""
7+
else
8+
result="差分あり"
9+
fi
10+
11+
echo "result=$result" >>"${GITHUB_OUTPUT}"

src/show_diff.sh

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)